blocks/app-status-bar
Import
Section titled “Import”import * as api from "@fungi.computer/caps/blocks/app-status-bar";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | AppStatusBarProps | Props accepted by AppStatusBar. |
| type alias | StatusBarPickerOption | One choice a status bar picker offers. |
| type alias | StatusBarPickerProps | Props accepted by StatusBarPicker. |
| type alias | StatusBarChipProps | Props accepted by StatusBarChip. |
| constant | StatusBarChip | One App-declared status bar control (an action, a toggle or a menu trigger): a flat chip with the same quiet face as StatusBarPicker. It forwards its ref and props, so a menu can render it as its trigger. |
| function | AppStatusBar() | One App window’s status bar: its attachment first, then the App’s own readouts, with an optional far-end readout. One bar per window. |
| function | AppStatusItem() | One quiet status readout. |
| function | StatusBarPicker() | The status bar’s attachment picker: a quiet label that opens a searchable list above the bar. Selection is a request; the caller owns the change. |
AppStatusBarPropstype alias
Section titled “AppStatusBarProps”type AppStatusBarProps = HTMLAttributes<HTMLElement> & object;Props accepted by AppStatusBar.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
attachment? |
ReactNode |
What this window is attached to: a StatusBarPicker, or a plain AppStatusItem when it cannot be changed. Every App keeps it first. |
end? |
ReactNode |
Readouts held at the far end, such as save state. |
StatusBarPickerOptiontype alias
Section titled “StatusBarPickerOption”type StatusBarPickerOption = Readonly<{ id: string; label: string;}>;One choice a status bar picker offers.
StatusBarPickerPropstype alias
Section titled “StatusBarPickerProps”type StatusBarPickerProps = object;Props accepted by StatusBarPicker.
Properties
Section titled “Properties”noun: string;What is picked, e.g. “Computer”; the trigger is named “<noun>: <label>”.
pluralNoun
Section titled “pluralNoun”pluralNoun: string;The plural used for searching, e.g. “Computers”.
icon: ReactNode;The picked thing’s mark, shown before its label.
options
Section titled “options”options: readonly StatusBarPickerOption[];value: string | null;The selected option id; null when nothing is attached.
onSelect
Section titled “onSelect”onSelect: (id) => void;Called with a different option’s id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”void
emptyMessage?
Section titled “emptyMessage?”optional emptyMessage?: ReactNode;Shown when the list is empty, e.g. why nothing can be chosen.
accessibleLabel?
Section titled “accessibleLabel?”optional accessibleLabel?: string;The trigger’s accessible name; defaults to “<noun>: <label>”.
disabled?
Section titled “disabled?”optional disabled?: boolean;optional open?: boolean;Host-owned popup visibility; omitted for the ordinary trigger-owned picker.
onOpenChange?
Section titled “onOpenChange?”optional onOpenChange?: (open) => void;Reports popup dismissal or trigger activation to the host.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
open |
boolean |
Returns
Section titled “Returns”void
StatusBarChipPropstype alias
Section titled “StatusBarChipProps”type StatusBarChipProps = Omit< ButtonHTMLAttributes<HTMLButtonElement>, "children"> & object;Props accepted by StatusBarChip.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
label |
ReactNode |
Visible name of the item, e.g. “Ports”. |
icon? |
ReactNode |
Decorative mark before the label; on a phone the chip shows it alone. |
readout? |
ReactNode |
A readout after the label, such as a CountBadge. |
pressed? |
boolean |
Toggle state. undefined is an ordinary action; a boolean adds aria-pressed and fills the chip while on. |
expanded? |
boolean |
Disclosure state for a chip that opens a menu or panel. A boolean adds aria-expanded and fills the chip while open. |
StatusBarChipconstant
Section titled “StatusBarChip”const StatusBarChip: ForwardRefExoticComponent< Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & object & RefAttributes<HTMLButtonElement>>;One App-declared status bar control (an action, a toggle or a menu trigger): a flat chip with the same quiet face as StatusBarPicker. It forwards its ref and props, so a menu can render it as its trigger.
AppStatusBar()function
Section titled “AppStatusBar()”function AppStatusBar(__namedParameters): Element;One App window’s status bar: its attachment first, then the App’s own readouts, with an optional far-end readout. One bar per window.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
AppStatusBarProps |
Returns
Section titled “Returns”Element
AppStatusItem()function
Section titled “AppStatusItem()”function AppStatusItem(__namedParameters): Element;One quiet status readout.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
HTMLAttributes<HTMLSpanElement> |
Returns
Section titled “Returns”Element
StatusBarPicker()function
Section titled “StatusBarPicker()”function StatusBarPicker(__namedParameters): Element;The status bar’s attachment picker: a quiet label that opens a searchable list above the bar. Selection is a request; the caller owns the change.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
StatusBarPickerProps |
Returns
Section titled “Returns”Element