AppRail
Composable rail structure for server switching, destinations, unread attention, and footer actions.
<AppShellRailSlot>
<AppRailRoot>
<AppRailHeader>
{/* App-owned server switcher */}
</AppRailHeader>
<TooltipProvider>
<AppRailNav>
<Tooltip>
<TooltipTrigger
render={
<AppRailItem
selected
nativeButton={false}
render={<Link to="/chat" />}
/>
}
>
<AppRailItemIcon>
<MessageSquare />
<AppRailItemAttention title="Unread activity">
<Activity />
</AppRailItemAttention>
</AppRailItemIcon>
<AppRailItemLabel>Chat</AppRailItemLabel>
<AppRailItemBadge>3</AppRailItemBadge>
</TooltipTrigger>
<TooltipContent side="right">Chat</TooltipContent>
</Tooltip>
</AppRailNav>
<AppRailFooter>
<NotificationCenter>
<NotificationCenterTrigger type="button" aria-label="Notification center" />
</NotificationCenter>
<Tooltip>
<TooltipTrigger
render={
<AppRailItem
nativeButton={false}
render={<button type="button" />}
/>
}
>
<AppRailItemIcon>
<Settings />
</AppRailItemIcon>
<AppRailItemLabel>Settings</AppRailItemLabel>
</TooltipTrigger>
<TooltipContent side="right">Settings</TooltipContent>
</Tooltip>
</AppRailFooter>
</TooltipProvider>
</AppRailRoot>
</AppShellRailSlot>API#WIP
| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Layout root for header, nav, and footer regions. Owns no selection state. |
| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"div"> | — | Top region for an app-owned server switcher or equivalent identity control. |
| Prop | Type | Default | Description |
|---|---|---|---|
selected | boolean | — | Marks the item as selected. Sets data-selected and aria-pressed when nativeButton is true. Owned by the caller. |
nativeButton | boolean | true | When false, skip native button type/disabled/aria-pressed wiring so render can replace the host element (for example a router Link). |
...props | useRender.ComponentProps<"button"> | — | Button attributes plus render. Compose icon, label, badge, and attention parts as children. |
| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"span"> | — | Square icon slot. Place the glyph and optional attention overlay here. |
| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"span"> | — | Visible or assistive label for the item. |
| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"span"> | — | Optional unread or count badge beside the icon. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Attention glyph rendered inside the mask. |
title | string | — | Optional label exposed to assistive tech. The indicator itself stays decorative. |
| Prop | Type | Default | Description |
|---|---|---|---|
...props | useRender.ComponentProps<"span"> | — | Mask wrapper used by AppRailItemAttention around the attention glyph. |
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Status props | — | Decorative attention status dot. Defaults to attention and a theme-aware variant; usually rendered by AppRailItemAttention. |