App frame
import { AppShell, AppFrame, AppBar, AppCrumbs, AppSwitcher, SessionMenu, SessionSpaces, useOwnPresence, AppSidebar, AppPanel, ListDetail, SettingsPage, Sheet } from "@arcadia/ui";TSX
Examples
Controls at the foot
Spaces
Try it
Search nine teams or open the full team list.
Without a personal space, the list starts with teams.
Settings page
Workspace
Name
Key
WKSEmail updates
Language
Description
Data
Members
4Export
Measures
| Token | Use | Value |
|---|---|---|
| The bar: one line, the same in every product. | ||
| The sidebar's column beside the panel: the width the person set, in the flow at every width. | ||
| The narrowest width navWidth clamps to when controlled. | ||
| The widest width navWidth clamps to when controlled. | ||
| The sidebar's rail, its column closed: the strip at the frame's start that never closes. | ||
| The leading room in the rail's head reserved for a desktop window's traffic lights. | ||
| The right pane's column beside the panel, at every width. A quarter of it is the least a pane takes. | ||
| The panel from the window's end and bottom edges, and its start with no sidebar beside it. | ||
| A panel's least usable width beside an open sidebar: the frame opens its column the first time only where the rail, the column and this fit. | ||
| A panel title's least inline size before its head wraps the readout and the controls under it. | ||
| The panel's corner: a surface's frame, 12. | ||
| A settings page's one column. | ||
| Any other page's column: members, a record, a table. A settings page keeps its own. | ||
| A wide page's column for lists and tables. | ||
| Under this width of the frame its panel and its page step in by one step less. | ||
| A ListDetail's list column while its detail stands beside it. | ||
| Under this width of a ListDetail its detail opens over the list in a dialog. |
Sheet
--sheet-w- TokenRef<Measure>
- Default:
var(--app-sidebar-width)
AppShell
productrequired- { name: string; href: string }
- The app you are in: the bar's mark and name lead to it, and the switcher marks it.
hideProductName- boolean
- Omit the visible product name beside the mark, the mark alone leading home (an
AppBarhideProductName). crumbs- readonly AppCrumb[]
- Where you are inside it, from the product's first level down to the page; an
AppCrumbsis drawn. apps- readonly AppProduct[]
- The apps the switcher offers and the bell asks Crew among. Left out, Arcadia's own list,
ARCADIA_APPS. arcadiaHome- string
- Where the mark leads, for a bar whose mark leads elsewhere than the product: the account's, Crew's Inbox.
barEnd- ReactNode
- One control before the switcher, in the bar's end group.
switcher- boolean
- The apps' switcher: in the bar's end (the default), or false for a product that draws its own at the sidebar's foot.
bell- AppBellProps | ReactNode
- The bell: its props, your own node, or
truefor the plain one. False leaves it out. session- SessionMenuProps | ReactNode
- The person's menu: its props, your own node, or
truefor none until the session loads. sidebar- AppSidebarProps | ReactNode
- The sidebar: its props, or your own node. False leaves it out, for a product of one page.
banner- ReactNode
- One line above the page, inside its panel: a notice about the view.
panel- Omit<AppPanelProps, "children">
- The panel's head: title, readout, action, bar, fill, centred, viewportRef and viewKey. Its page is this shell's children.
skipTo- string
- The id of the element the skip link moves to focus, inside the panel. Left out, the page's title, then the panel.
barSpan- "frame" | "panel"
- Whether the bar spans the whole frame (
frame) or sits inside the panel column only (panel). rail- ReactNode
- The sidebar's rail: its own node, standing at the frame's start at every width.
pane- ReactNode
- The right pane: its own node, a column of its own beside the panel at every width.
paneGrip- ReactNode
- Optional resize control drawn on the pane's leading edge inside
--app-panel-inset. navOpen- boolean
- The sidebar column is open. Left out, the frame opens it where the rail, the column and
--app-panel-minfit, and holds the person's choice at every width from their first toggle. onNavOpenChange- (open: boolean) => void
- Called when the sidebar column opens or closes.
navWidth- number
- The sidebar column's width in pixels, clamped between
--sidebar-width-minand--sidebar-width-max. onNavWidthChange- (px: number) => void
- Called with the clamped width the sidebar takes when
navWidthfalls outside its range. navSurface- "split" | "joined"
- Default:
"split" - How the rail and the sidebar column share a surface:
splitorjoined. window- "web" | "desktop"
- Host window mode:
desktopmarks the bar and rail head as drag regions withno-dragon controls. corner- ReactNode
- Leading slot in the rail's head, reserving
--app-corner-widthfor desktop window corner controls. paneOpen- boolean
- The right pane is open. Left out, the frame holds it, starting closed.
onPaneOpenChange- (open: boolean) => void
- Called when the pane opens or closes.
paneWidth- number
- The right pane's width in pixels; the frame clamps it to its least and to what the frame has left.
onPaneWidthChange- (px: number, share: number) => void
- Called with the clamped width the pane takes and its share of the frame (
px / frameWidth) when narrowed. inert- boolean
- Sets
inerton the frame'smainpanel subtree while a sibling layer covers it. rootStyle- RootStyle
- Typed StyleX override: its size where it is not the whole window.
childrenrequired- ReactNode
- The page.
barrequired- ReactNode
- The bar: an
AppBar, or a product's own top bar. barSpan- "frame" | "panel"
- Default:
"frame" - Whether the bar spans the whole frame (
frame) or sits inside the panel column only (panel), tracking the panel's x-range as the sidebar and pane change width. sidebar- ReactNode
- The sidebar: an
AppSidebar, in a column of its own that the person opens and closes at every width. Leave it out for a product of one page. rail- ReactNode
- The sidebar's rail: the narrow strip that stands at the frame's start at every width, before the column (a product's icons, its history, its lights). The column closes to it; omit
railwithnavOpen={false}to hide the sidebar whole. navOpen- boolean
- The sidebar's column is open. Left out, the frame decides the first time: open where the rail, the column and the panel's least usable width fit (
--app-rail-width+--app-sidebar-width+--app-panel-min), closed under that. From the person's first toggle the choice holds at every width, and the panel takes what is left beside it. onNavOpenChange- (open: boolean) => void
- Called when the column opens or closes: its toggle in the bar, or the product's own control.
navWidth- number
- Controlled sidebar width in pixels, bounded by the sidebar width tokens and the frame's room. Omit for local resizing, starting at
--app-sidebar-width. onNavWidthChange- (px: number) => void
- Reports the clamped width on resize, or when the controlled width exceeds the available range.
navResizable- boolean
- Default:
true - Show the built-in resize grip on the open, in-flow sidebar. @default true
navGrip- ReactNode
- Replaces the built-in resize grip. Pass
falseto leave the edge empty. navSurface- "split" | "joined"
- Default:
"split" - How the rail and the sidebar column share a surface:
splitdraws the rail and column as two parts side by side;joineddraws one ground and one trailing hairline with the rail as the column's leading part and total width equal tonavWidth. window- "web" | "desktop"
- Default:
"web" - Host window mode:
desktopmarks the bar and the rail's head as drag regions (-webkit-app-region: drag) and setsno-dragon every interactive descendant so native hit-testing and keyboard focus stay intact. corner- ReactNode
- Leading slot in the rail's head, reserving
--app-corner-widthfor a desktop window's corner controls and traffic lights. Off until passed. pane- ReactNode
- The right pane: a column of its own beside the panel at every width, never a sheet or a strip over it.
paneGrip- ReactNode
- Optional resize control drawn on the pane's leading edge inside
--app-panel-inset(such asResizeGrip). paneOpen- boolean
- The right pane is open. Left out, the frame holds it, starting closed. The frame never closes a pane for the width of the window, and never narrows it under its least: the panel gives way instead, and where the open columns leave it no width at all it is inert, so no stop lands where nothing shows.
paneLabel- string
- The pane's name for a reader (it is a complementary landmark): "Review", "Files".
onPaneOpenChange- (open: boolean) => void
- Called when the pane opens or closes.
paneWidth- number
- Default:
--app-pane-width - The right pane's width in pixels, the product's to drag. The frame clamps it: never under a quarter of
--app-pane-width, and never more than the frame has left beside the rail and the open column above the panel's floor (--app-panel-title-min). Under that the pane keeps its least and the panel goes under its floor. onPaneWidthChange- (px: number, share: number) => void
- Called with the clamped width the pane takes and its share of the frame (
px / frameWidth) when the frame narrows it. The live share is also published as--app-pane-shareon the frame root. inert- boolean
- Default:
false - Sets
inerton the frame'smainpanel subtree while a sibling settings or dialog layer covers it. Siblings outsideAppFramestay interactive, and focus returns to the opener wheninertclears if nothing else claimed it. skipTo- string
- The id of the element the skip link moves to focus, inside the panel: a page's first field or list. Left out, the page's title, then the panel.
rootStyle- RootStyle
- Typed StyleX override: its size where it is not the whole window (a picture of it).
children- ReactNode
- The page: an
AppPanel.
productrequired- string
- The product's short name beside the mark ("Crew").
hideProductName- boolean
- Default:
false - Omit the visible product name beside the mark, and use
productas the home link's accessible name. Ignored whenarcadiaHomeis set: there the mark and the name are two distinct links. homerequired- string
- The product's home: the mark and the name link there.
arcadiaHome- string
- Where the mark leads, for a bar whose mark leads elsewhere than
home(the account's: Crew's Inbox): the mark and the name are then two links, standing where the one stood. crumbs- ReactNode
- Where you are inside the product: an
AppCrumbs. end- ReactNode
- One control before the switcher, for a product that needs one in the bar.
switcher- ReactNode
- The app switcher: an
AppSwitcher. The bar draws it where it is given, and nothing where it is not: a product that moves it to the sidebar's foot (AppSidebar'sfoot) passes it there and not here. bell- ReactNode
- The bell: an
AppBell, between the switcher and the person. Left out, the bar draws nothing for it. session- ReactNode
- The person's menu: a
SessionMenu(aSkeletoncircle while the session loads, so its place stands meanwhile). Left out, the bar draws nothing for it.
itemsrequired- readonly AppCrumb[]
- From the product's first level down to the page; with
current, the levels above it, every one a parent. current- ReactNode
- The page itself, in place of the last of
items: any node (an inline rename, a control beside the name). Every entry ofitemsis then a parent crumb, and this stands after the last of them, in the last slot. It gives way as the page does: it shrinks, and only after the parents have, so it should truncate its own text (aFadeText). fold- "start" | "middle"
- Default:
"start" - Which levels give way when the bar is narrow.
"start": from the first level."middle": the first level stays and the levels between it and the page fold into one menu button, which opens them. aria-label- string
- Default:
"Breadcrumb" - The landmark's name.
foldLabel- string
- Default:
"Earlier levels" - What the menu button of folded levels is called, for
fold="middle".
products- readonly AppProduct[]
- Default:
ARCADIA_APPS - The apps to offer, in order. Left out, Arcadia's own list,
ARCADIA_APPS, which is what a product wants; a list is passed only where the addresses differ, as on a developer's machine. The products: never the docs, never the account. current- string
- The name of the app you are in: marked, and not a link.
open- boolean
- Controlled open state.
defaultOpen- boolean
- Default:
false - Initial open state when uncontrolled.
onOpenChange- MenuProps["onOpenChange"]
- Called when the menu opens or closes.
modal- boolean
- Default:
true - Holds the page's scroll and pointer while open.
namerequired- string
- The person's name: the trigger's accessible name, the menu's head and the avatar's initials.
address- string
- Their address, under the name; without it the line is not drawn.
picture- string
- Their picture's address; without it, the initials of
name. mark- { node: ReactNode; label?: string }
- A mark beside the avatar: a count, a
StatusDot(attention). Its words join the trigger's name. account- string
- The Arcadia account's address. Leave it out on the account itself.
themerequired- "system" | "dark" | "light"
- The theme chosen now.
onThemeChangerequired- (theme: ThemePreference) => void
- Called with the theme picked.
onSignOutrequired- () => void
- Signs out: a request, never an address (K48).
onSendFeedback- (report: FeedbackReport) => Promise<void> | void
- Sends a report from the feedback sheet (
FeedbackDialog'sonSend). With it the menu holds "Send feedback", after the theme, and the row opens the sheet. teams- readonly SessionTeam[]
- The person's teams, in the order they joined, from the product's copy. With them the menu opens on the spaces, each a link: the person's own (their name, "Personal") where the product has one, each team by name, "All teams" past seven, and "New team".
personal- boolean
- Default:
false - The product has a space of the person's own: its row leads the spaces, by their name and "Personal", at
spaceHref(null). Left out, a product with none (Crew) draws no such row. space- string | null
- The space they are in, checked: a team's id, or
nullfor their own (withpersonal). Left out, none is (Crew's first screen is no team). spaceHref- (team: SessionTeam | null) => string
- Where a space's row leads as a link: a team's (
/t/<handle>), or withnullthe person's own (/dashboard). The kit knows no address. onSpaceSelect- (team: SessionTeam | null) => void
- Called when a space's row is pressed as a button instead of navigating by
spaceHref: the team, ornullfor personal. teamsHref- string
- The account's page of the person's teams, which "All teams" opens.
newTeamHref- string
- The account's page that makes a team, which "New team" opens.
presence- "online" | "busy" | "offline"
- The person's own state, from Crew: on their picture in the bar, and checked in their menu.
onPresenceChange- (choice: PresenceChoice) => void
- Called with the person's choice. With it the menu holds "Online" and "Busy", the current one checked; under Busy one fold: "For an hour", "Until tomorrow", "Until I turn it off", the last what a plain press on Busy takes.
busy- boolean
- Default:
false - Signing out is under way: a spinner holds the avatar's place and presses wait.
open- boolean
- Controlled open state.
defaultOpen- boolean
- Default:
false - Initial open state when uncontrolled.
onOpenChange- MenuProps["onOpenChange"]
- Called when the menu opens or closes.
modal- boolean
- Default:
true - Holds the page's scroll and pointer while open.
children- ReactNode
- The product's own rows, before the account (
MenuItem,MenuLinkItem: "Admin").
namerequired- string
- The person's name: their own space's row, when
personalis set. teamsrequired- readonly SessionTeam[]
- The person's teams, in the order they joined. Past seven, "All teams" follows them when
teamsHrefis given. personal- boolean
- Default:
false - Include the person's own space first, labelled "Personal".
space- string | null
- The space they are in, checked: a team's id, or
nullfor their own (withpersonal). Left out, none is checked. spaceHref- (team: SessionTeam | null) => string
- Where a space's row leads as a link: a team's (
/t/<handle>), or withnullthe person's own (/dashboard). onSelect- (team: SessionTeam | null) => void
- Called when a space's row is pressed as a button (instead of navigating by
spaceHref): the team, ornullfor personal. teamsHref- string
- The account's page of the person's teams, which "All teams" opens past seven teams.
newTeamHref- string
- The account's page that makes a team, which "New team" opens.
query- string
- What a
MenuSearchin the menu'ssearchslot holds: the rows narrow to the teams whose name holds it, past the seven, and a line says when none does.SessionMenudraws the field itself past seven teams; a sidebar's head puts its own in itsMenuContent.
aria-labelrequired- string
- The landmark's name ("Team", "Account").
id- string
- The landmark's id, for what finds it from outside (a deploy's check of the page, a link to it).
head- ReactNode
- What the rows belong to, above them, staying while they scroll (a team picker).
groupsrequired- readonly AppSidebarGroup[]
density- "compact"
foot- ReactNode
- The product's own controls in one row, pinned under the groups and outside the navigation landmark beside them: a search, the apps' switcher, the bell (
AppBell), the person's menu. It stands on the rows' inset and on the panel's inset from the frame's bottom edge, so the sidebar and the panel end on one line, and its controls come after the rows in reading and Tab order. A product that gives these a home here gives the bar's end nothing. busy- boolean
- The rows are loading (
aria-busy).
title- ReactNode
- The page's title: text, or a node that renders its own
h1(a title edited in place, which takestabIndex={-1}). subtitle- ReactNode
- One quiet line under the title, on its text edge: the page's purpose, a chat's, a board's.
readout- ReactNode
- One quiet thing before the actions, never a control: a key, a count, a legend. Text reads as a readout.
actions- ReactNode
- More than one control at the head's end, before
action: a search, a members control, a menu of more. action- ReactNode
- The last action, at the head's end (the page's menu or its one button).
bar- ReactNode | ((room: boolean) => ReactNode)
- The head's second row (O46); a function is told if the panel has room for chips.
banner- ReactNode
fill- boolean
- Default:
false - The page fills the panel and scrolls on its own (a board, a chat with its foot). Without it the page scrolls in the panel as one column, on the head's inset.
centred- "settings" | "page" | "wide"
- The head and the page stand in one column in the panel's middle, at the settings measure (
settings,--app-settings-width), the page's (page,--app-page-width) or the wide measure (wide,--app-wide-width): the title on the column's text edge, where a settings group's label stands, and the readout and the action ending on it. A page withfilllays itself out. viewportRef- Ref<HTMLDivElement>
- The column's scrolling element, as
ScrollAreahands it: to read or set its scroll, or foruseScrollKeysanduseStickToBottom. A page withfillbrings its own scroller. viewKey- string
- Changes when the view changes (its address): the title then takes focus, so a keyboard and a reader start in the new view.
children- ReactNode
- The page.
listrequired- ReactNode
- The rows a person chooses from, scrolled in their own column.
listLabelrequired- string
- The list's scroller, named: "Reports".
detail- ReactNode | ((beside: boolean) => ReactNode)
- The chosen item's view, or nothing while none is chosen. Beside the list it scrolls in its own column; where the part is narrower than
--list-detail-breakpointit opens over the list in aDialog. A function is told whether it stands beside, so in the dialog it draws its ownDialogHeaderandDialogBody. detailLabelrequired- string
- The detail's scroller, and its dialog, named: "Report".
empty- ReactNode
- One quiet line where the detail stands while nothing is chosen: "Choose a report to read it."
onCloserequired- () => void
- The detail's dialog closes: the product clears its choice.
rootStyle- RootStyle
- A component's typed override prop:
Layoutand its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).
sharedColumns- boolean
- Default:
false rootStyle- RootStyle
- A component's typed override prop:
Layoutand its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).
aria-labelrequired- string
modal- boolean
- Default:
true keepMounted- boolean
- Default:
false instant- boolean
initialFocus- FocusTarget
- initialFocus / finalFocus: a ref, a boolean, or a function of how the popup was opened.
finalFocus- FocusTarget
- initialFocus / finalFocus: a ref, a boolean, or a function of how the popup was opened.
container- PortalContainer
- Where a surface's portal mounts. Default:
document.body. Pass a themed subtree to keep itsdata-theme, or a transformed stage to containposition: fixedoverlays (previews): a modal set down in one stays in it, shown in place, out of the browser's top layer. surface- "sidebar"
side- "inline-start" | "bottom"
- Default:
"inline-start" rootStyle- SheetStyle
open- boolean
- Controlled open state.
defaultOpen- boolean
- Default:
false - Initial open state when uncontrolled.
onOpenChange- (open: boolean, details: OpenChangeDetails) => void
- Called when the popup opens or closes, with why (
details.reason) and the event. onOpenChangeComplete- (open: boolean) => void
- Called once the open or close transition has finished.
id- string
- The dialog's id, for the control that opens it (
aria-controls).
Rest props go to <div> props.