Nacre / Components
Components
129 components across 61 pages. Each page includes working TSX examples and its API.
Foundations
- Icon Line icons in five sizes (12 / 14 / 16 / 18 / 20, 16 by default); pass a token name for the color. Valid names are the keys of ICONS (IconName). Use IconBadge for leading type indicators. For icon buttons use IconButton, which requires a name.
IconIconBadge - Motion Motion is organized in five kinds (ADR 0019): presence (Presence, Enter, PopLayer), morph (no component uses it now), swap (ContentSwap), move (SPRING, springTo) and feedback (TRANSITION, PRESS). Components take parameters from semantic recipes (motionRecipe, MOTION), never their own durations or curves; with Reduce Motion they skip or only fade.
ContentSwapEnterPresencePopLayer+2
Actions
- Button Triggers an action. One or two primary buttons per screen, for the view’s main submission; everything else is secondary, outline or ghost.
Button - IconButton An icon-only button for toolbars, rows and the composer. label is required and serves as both the screen reader name and the tooltip; actions with text use Button.
IconButton - ToolbarButton An icon + text button for toolbars (the composer toolbar, call controls): it can collapse to an icon, has a toggle state, and shows a shortcut hint after the text. Icon-only buttons outside a toolbar are IconButtons; standalone submit actions are Buttons.
ToolbarButton
Inputs & selection
- Checkbox Multiple selection and confirm-style toggles, with a mixed state. Use CheckBox for the box alone, and CheckRow for a fully clickable row with text; both call back with onChange(checked).
CheckBoxCheckRowCheckMark - ChoiceChip A set of short options where several can be picked, drawn as rounded chips: feedback reasons, interest tags. Reads as a checkbox and toggles with Space; the checked chip shows a checkmark on a subtle tint, and pressing only changes the fill, without scaling.
ChoiceChip - Select Picks one option from a set. SelectMenu owns the popup and the options, SelectTrigger is the trigger in a form; more than 10 options get a search row (see Combobox).
SelectTriggerSelectMenu - TextField Single-line or multiline input. Counts sit at the end of a single-line field or at the bottom right of a multiline field. Set counterWarnAt for a near-limit warning. Validation uses an error border and message. Use SearchField for search.
TextFieldTouchTextArea - SearchField A magnifier, an input, and a clear button once there’s text. With only onChange it filters instantly; with onCommit it submits (on Return and on clear, for server-side search). Records pages search by field with KeywordSearch.
SearchFieldKeywordSearch - Field One container for the label, required asterisk, description and error text; every form in the app is laid out with it. Vertical in dialogs and the right panel, horizontal on settings pages.
Field - Segmented Picks one of 2–5 mutually exclusive values, all visible at a glance; controlled value + onChange, with the selection sliding over on a spring.
Segmented - Combobox Searchable selection: a search field appears with more than 10 options, options can be grouped, and individual ones disabled. Single selection in forms uses SelectMenu (whose popover is a Combobox); Combobox’s multiple selection (handed over only when you click “Apply”) is used by the filter chip’s multi-select editor; see the FilterBar page.
ComboboxSelectMenuComboboxPopoverTouchComboboxSheet+1 - Cascader Drills down a category tree level by level and only selects leaves; the popover has a search field at the top, and the result is the full path. Use it for fixed-depth data such as case and Notes categories.
CascaderTouchCascaderTouchCascaderSheet - Radio Picks one of a few mutually exclusive options, all visible at a glance. RadioRow goes in the library’s RadioGroup; use inline rows for “Yes / No”, and full rows when options need a description.
RadioGroupRadioRowRadioMark - Switch A two-state setting that takes effect immediately; use a checkbox when it applies only after Save. The track measures 32 × 18 on desktop and 51 × 31 on phones (the native iOS size). The on state uses the brand color and the thumb slides on a spring in one continuous move.
Switch - Slider Drags out a continuous value within a range: volume, recording playback position. Use onChange while dragging; actions like seek that should happen only on release go in onChangeEnd.
Slider - TimeField Edit hours and minutes in 24-hour time. Used for quiet hours and date filters.
TimeField
Display
- Softphone and CallStatusCard A sidebar hotline card and a header for incoming calls and dialing panels. Only ringing tints the card. A connected call and the panel title use neutral surfaces.
CallStatusCardCallPanelHeader - InlineAction Use InlineAction for commands and InlineLink for destinations in prose.
InlineActionInlineLink - MediaButton The pressable surface for images and videos: images in messages, album thumbnails, video covers and the viewer’s filmstrip. Pressing drops it to 80% opacity without scaling, the focus ring is drawn inside the image (two-tone, visible on any picture), and the selected item is outlined and read as selected.
MediaButton - Tag A small square-cornered label for status and markers: dot for status, text for category markers, soft for a fully tinted tag, and outline / dashed for small actions in a tag row. It can be pressable, selectable and removable. Use the rounded Pill for people and groups.
Tag - Badge A count of unread and pending items: 0 shows nothing, and anything over 99 shows 99+; dot supports 8pt attention indicators and 6pt recording and live-call indicators. When you only need the formatted text (window title, Dock badge), use formatBadge(count).
Badge - Presence An agent’s Online / Break / Offline status: PresenceDot is an 8pt dot (it can sit on an avatar), and Pill is a capsule with a dot and text; a Pill without a status is a plain-text group or skill tag.
PresenceDotPill - Avatar Represents a person: shows the image when there is one, otherwise the first character of the name, with a person glyph as the customer fallback; a presence status can sit at the bottom-right corner.
Avatar - StatCard One metric on a dashboard: title, value, change, and secondary metrics below a divider. It can be pressable and selected (press a card to switch the trend chart’s metric). Place it on plane.
StatCard - DescriptionList Read-only label / value rows: customer profile in the right panel, ticket details, call info, merge previews. Labels sit in a fixed-width gray column, values are 12pt and wrap, and can carry a copy button; empty values show a placeholder. Not a form field: use Field for editable values.
DescriptionListDescriptionItemCopyButtonRevealableValue+1 - Timeline A column of nodes in time order: ticket activity, the stages of a call. It only draws the dots and connectors (none after the last item, a ring around the current node); the caller supplies the content and the order (newest first or last).
Timeline - Highlight Gives the parts of a search result that match the keyword the brand text color (brand-text) at weight 500, with no background; single line, truncated when it doesn’t fit.
Highlight - Kbd Shows a shortcut in tooltips, help and empty states: a gray keycap 20 tall and at least 20 wide. Icon buttons and menu items use their own shortcut; don’t assemble one by hand.
Kbd
Layout
- Card The one way to put content in a rounded box: tile floats on the gray plane, outline sits on a white background, and muted is a light gray inset block; the SectionHeader section title works both inside and outside cards.
CardSectionHeader - Divider A 1pt line in the border color that separates groups within one block of content; horizontal by default and filling the width, or vertical and filling the height. Separate blocks from each other with whitespace, not lines.
Divider - ScrollArea A scroll container with the library’s overlay scrollbar; with fade, each edge that can still scroll fades out over 24pt, and no edge fades at the end or when content doesn’t overflow. When using nsh’s Scroll directly, pass scrollbarTheme() to its scrollbar for the same scrollbar.
ScrollArea - Disclosure Collapsible content: Disclosure is a group heading with a triangle (with an optional leading icon, count, trailing extras, separate actions outside the button, and the chevron at the start or end), and DisclosureRow is a fully clickable record row that opens to show details. Both handle only the heading row; the caller shows or hides the content from expanded with If or Collapsible.
DisclosureDisclosureRow - PaneHeader The title row at the top of a pane or panel: 48 tall, 13 side insets, a 1pt line below; back on the left, title and secondary detail, actions and close on the right. Panes in the layout use pane (13pt), popovers and drawers use panel (16pt).
PaneHeader
Collections
- QueryTable The foundation of records pages: a query results table with paging, column settings, row actions and a selection bar; the header stays put while loading and on empty results.
QueryTablePagerColumnSettingsButtonRowActionsCell+1 - List Vertical lists for picking people, popover lists, notifications, search results and management lists: ListRow is a list row (36 / 52 for one or two lines on desktop, at least 48 / 64 on phones, or a compound row with any content, optionally with separate trailing actions), ListActionRow is a compact row with a trailing delete, and all go in the inset container ListBox.
ListRowListBoxListActionRowChoiceList+3
Navigation
- SidebarStatusEntry A sidebar entry that carries a status (phone): expanded it is a 36pt row shaped like a nav item, ending in status text and one persistent action; collapsed it is a 36pt icon with a status dot. Pressing it grows a GrowMenu in place.
SidebarStatusEntry - RailTabs Vertical icon tabs on the outer edge of a side panel that switch its panes (Xcode’s inspector, Zendesk’s context bar): each tab is an icon plus a two- or three-character short name, with the full name as its tooltip. Controlled value + onChange; a null value means the panel is collapsed, and with collapsible pressing the current tab collapses it.
RailTabsTouchNavigationBarTouchTabBar - Tabs Top-level navigation between the large sections of one area (GitHub Primer UnderlineNav): the current tab in the foreground color with a 2pt indicator underneath, the others muted. Tabs that don’t fit go into a trailing “More ⌄” menu, and a current tab in the overflow swaps into the last visible place; it never scrolls sideways. Controlled value + onChange.
Tabs - Sidebar The app’s main navigation: Sidebar is the full-height column (256 expanded / a 52 icon rail collapsed, resizable from the right edge), SidebarGroup groups items and can collapse, SidebarItem is a navigation item, and SidebarAccount is the account entry at the bottom whose account menu grows out of it in place when pressed.
SidebarSidebarGroupSidebarItemSidebarAccount+1
Menus & overlays
- GrowMenuTrigger Custom status content shared by a trigger and its menu footer.
GrowMenuTrigger - Dialog Interrupts the current task when the user has to decide or fill in a short form. A centered card over a scrim: title, description, scrolling body and a row of buttons.
DialogDialogPanelTouchSheetTouchSearchField+1 - Drawer A detail surface floating at the right of the page: no dimming, and the page keeps its width; the left edge drags to resize. For more levels the caller stacks the next one on the same surface, and DrawerHeader shows “Back to” the previous one.
DrawerDrawerHeader - DropdownMenu A set of actions opened from a button. Menu entries (MenuEntry) use type to tell item / heading / separator apart, and can carry an icon, a shortcut, a checkmark, a disabled state or a destructive style; the menu closes once an item is chosen.
DropdownMenu - GrowMenu A menu that opens in place: a panel rises from the account row at the bottom of the sidebar, its bottom row (GrowMenuFooter) sitting exactly over the trigger row with the same content; it appears at once and fades out on close, without morphing. Items can carry a presence dot, an icon, a text mark and a submenu.
GrowMenuGrowMenuFooterMenuMark - Popover Use Popover for a form or calendar with a trigger and HoverPreview for a hover preview. Use FloatingLayer for selection actions or a panel docked to the window. Its caller controls dismissal.
PopoverHoverPreviewFloatingLayer - MenuContent Embeddable menu content: a column of menu rows (items, group headings, separators, checkable items) to put inside a Popover. Rows, marks and checks are the same as GrowMenu’s, with the arrow keys, Home / End and typeahead built in; with closeOnSelect={false} choosing keeps the menu open, for menus such as appearance and accent color where people try several in a row.
MenuContent - CommandPalette A modal search field over grouped commands, opened with ⌘K: it filters by label and keywords, shows each command’s shortcut at the end of its row and says so when nothing matches; CommandTrigger is the entry point that looks like a search field. Where the commands come from and what they do stay in the app.
CommandPaletteCommandTrigger - Tooltip A one-sentence explanation on hover or keyboard focus. Button / IconButton take tooltip (and shortcut) directly; other elements wrap text with textTooltip(text, placement, shortcut) into a tooltip bubble set on tooltip; field definitions use HelpTip ⓘ. Long text wraps on its own, and the shortcut sits on the right.
HelpTipTooltipLabel
Feedback
- Toast A light notice for action results and errors that doesn’t interrupt work: call toast.show({ kind, message, … }) from anywhere, and mount <ToastHost /> once at the app root to draw it (top center of the window, up to 3 stacked, 3 seconds by default and 10 for errors or toasts with an action, timer paused on hover or while keyboard focus is inside). Touch devices follow other rules: success is not shown by default (pass essential: true when the result can’t be seen on screen; it becomes a pill under the status bar for 2 seconds), and error / warning become sticky banners with no timer, closed by hand or replaced by the same key.
ToastHost - Alert A status note that stays in the content flow: a failed load, truncated results, an unmatched customer, an owner conflict, an invitation hint. A light tone-tinted fill with an icon and text, optionally with actions and a close button; it doesn’t float and doesn’t go away on its own.
Alert - Skeleton A placeholder block for first-load content (muted fill, pulsing; no pulse with reduced motion). Size and corner radius come from class, widths computed from data from style, so the blocks take the shape of the real content and nothing jumps when data arrives. A load that ends quickly should not flash a skeleton: delayed keeps it transparent for SKELETON_DELAY (300ms) after it mounts.
Skeleton - EmptyState Explains why something is empty and what to do next: an icon on a light tile, a title, one line of guidance and an optional action. md fills the whole area, sitting slightly above center; sm goes in right-panel sections, popovers and lists.
EmptyState - Progress Progress shows task completion. Use RatioBar for read-only shares such as remaining credit or the distribution of ratings.
ProgressRatioBar
Filters
Messaging
- ChatMessage A row in a conversation: ChatMessage lays out the side, avatar column, author, group spacing and row state; ChatBubble is the bubble surface; ChatDeliveryIndicator is the delivery state of your own messages. They only draw: which side a message is on, whether it groups and whether it can be resent are the app’s call (after coss Chat UI).
ChatMessageChatBubbleChatDeliveryIndicatorChatCollapsibleMessage - ChatReplyReference A quoted message: the quote block inside a bubble (press to go back to the original) and the “Reply to someone: …” bar above the composer (with cancel). It only draws and reports presses; finding, scrolling to and flashing the original are the app’s job (after coss ChatReplyReference).
ChatReplyReference - ChatDatePill Separators and navigation in a conversation: the date pill, a wrapping system notice, the unread divider (the unread boundary when the chat was opened) and the jump-to-latest pill (when away from the bottom or newer messages exist). How days split, where unread starts and whether pressing loads the latest page first are the app’s call (after coss ChatDatePill / ChatUnreadDivider / ChatJumpToLatestButton).
ChatDatePillChatSystemPillChatUnreadDividerChatJumpToLatestButton - ChatComposerFrame The shell of a conversation’s composer: a rounded card with a focus border, in two layouts, collapsed (one row) and expanded (quote / attachments, editor, toolbar). It owns no draft, sending, uploads or quick replies; the app puts those in its slots (after the frame of coss Composer).
ChatComposerFrame - ComposerFrame A general composer frame: a rounded card with a focus border, removable quote chips, a multiline input that grows with its content, an inline send / stop button and a disabled state. For places where you type a passage and send it, such as Copilot questions and notes; the conversation composer adds collapsed / expanded layouts on top of it (ChatComposerFrame). It owns no draft or sending logic.
ComposerFrame
No component matches that name.