API reference
blocks/status-tray
Import
Section titled “Import”import * as api from "@fungi.computer/caps/blocks/status-tray";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | StatusTrayItem | One footer readout and the small tray it opens. Semantic data only: the chip’s
finish, the tray’s material and the seam between them come from theme tokens
(--caps-status-tray-*), never from a prop. |
| type alias | StatusTrayProps | Controlled selection and structural slots for a row of footer trays. |
| function | StatusTray() | A footer row of readout chips; one opens its tray above the row at a time. |
| function | StatusTrayList() | A group of tray rows. Precede it with a DataListHeading to label it. |
| function | StatusTrayRow() | One line: the host’s icon, a title, a muted detail that truncates, and a quiet text action (a ghost Button) at the end. |
| function | StatusTrayNote() | A quiet sentence for an empty or unavailable feed. Empty reads “All caught up.”
unless the host says otherwise; unavailable takes a title. |
StatusTrayItemtype alias
Section titled “StatusTrayItem”type StatusTrayItem = Readonly<{ id: string; label: ReactNode; count?: number; tone?: StatusTone; glyph?: StatusGlyph; motion?: StatusMotion; accessibleLabel?: string; title?: ReactNode; actions?: ReactNode; content: ReactNode; disabled?: boolean; after?: ReactNode;}>;One footer readout and the small tray it opens. Semantic data only: the chip’s
finish, the tray’s material and the seam between them come from theme tokens
(--caps-status-tray-*), never from a prop.
StatusTrayPropstype alias
Section titled “StatusTrayProps”type StatusTrayProps = Omit<HTMLAttributes<HTMLDivElement>, "title"> & object;Controlled selection and structural slots for a row of footer trays.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
items |
readonly StatusTrayItem[] |
Readouts and their tray contents in display order. |
openId |
string | null |
Which tray is open. The host owns this state. |
onOpenChange() |
(id) => void |
Requests a selection change or dismissal. |
leading? |
ReactNode |
Leading readouts that never open a tray (connection state, etc.). |
trailing? |
ReactNode |
Trailing controls after the chips (Send, Expand, …). |
placement? |
"housing" | "screen" | "host" |
Structural seat. housing sits on the plastic below a screen; screen sits inside a Display as flat, screen-native text (the wiki’s screen material rule); host means a host’s own chrome draws the chips, so only the open tray renders here. The look of each seat is theme-owned. |
align? |
"start" | "end" |
Which edge the tray aligns to. |
hostInset? |
number |
For host placement: where the host’s trigger starts, in CSS pixels from this tray’s inline start, so the open tray sits above it. |
StatusTray()function
Section titled “StatusTray()”function StatusTray(__namedParameters): Element;A footer row of readout chips; one opens its tray above the row at a time.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
StatusTrayProps |
Returns
Section titled “Returns”Element
StatusTrayList()function
Section titled “StatusTrayList()”function StatusTrayList(__namedParameters): Element;A group of tray rows. Precede it with a DataListHeading to label it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
HTMLAttributes<HTMLDivElement> |
Returns
Section titled “Returns”Element
StatusTrayRow()function
Section titled “StatusTrayRow()”function StatusTrayRow(__namedParameters): Element;One line: the host’s icon, a title, a muted detail that truncates, and a quiet text action (a ghost Button) at the end.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
Omit<HTMLAttributes<HTMLDivElement>, "children"> & object |
Returns
Section titled “Returns”Element
StatusTrayNote()function
Section titled “StatusTrayNote()”function StatusTrayNote(__namedParameters): Element;A quiet sentence for an empty or unavailable feed. Empty reads “All caught up.”
unless the host says otherwise; unavailable takes a title.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
{ children?: ReactNode; title?: string; } |
__namedParameters.children? |
ReactNode |
__namedParameters.title? |
string |
Returns
Section titled “Returns”Element