Skip to content
Foundation / Layout

AppShell

client23.75 kB
@stellaria/nebula-webAppShellProps

Preview

Preview

Props

27
PropTypeDefault

aside

ReactNode

asideWidth

number300

backdrop

Decorative layer behind everything: this is where a `StarField` lives.

ReactNode

children

ReactNode

chromeHeight

number

className

string

collapsedWidth

number0

collapsible

booleantrue

contentId

string

contentWidth

Bounds the rail grid — bar and content together — and centres it. Only the surfaces stay full-bleed. Rail layout only.

Unit

defaultNavbarOpened

booleantrue

footer

ReactNode

header

ReactNode

headerHeight

number56

labels

Partial<AppShellLabels>

mainRef

The `main` is what scrolls in the rail layout; it is exposed so you can hook a parallax background to it.

RefObject<HTMLElement | null>

navbar

ReactNode

navbarOpened

boolean

navbarWidth

number260

onNavbarChange

((opened: boolean) => void)

padded

booleantrue

scrollShadow

Shadow sail at the start of the scrolling area; it appears under the chrome, not over it.

booleantrue

scrollShadowOffset

The height the sail sticks from: use it to keep it beneath sticky chrome.

number0

sidebar

Full-height bar. Its presence switches the shell to the rail layout.

ReactNode

sidebarCollapsed

Third rail state: the bar shrinks to `sidebarMiniWidth` and its labels are hidden.

booleanfalse

sidebarMiniWidth

number76

sidebarWidth

number320

Slot props

4

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

chromeProps

The top chrome band. Only exists in the rail layout, and only with a `header`.

BoxSlotProps

mainProps

The `main`. In the rail layout it is also what scrolls; its ref goes separately, through `mainRef`.

BoxSlotProps

scrollShadowProps

The shadow sail at the start of the scrolling area. Rail layout only, and only with `scrollShadow`.

BoxSlotProps

skipProps

The skip-to-content link, visible only when focused. It exists in both layouts.

Omit<DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">

Parts

3
AppShell.BodyAppShell.FooterAppShell.Header

Also accepts

On top of its own props, this component forwards these groups.

Style props · 128