Skip to content
API reference

blocks/app-status-bar

Import
import * as api from "@fungi.computer/caps/blocks/app-status-bar";
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”
Signature
type AppStatusBarProps = HTMLAttributes<HTMLElement> & object;

Props accepted by AppStatusBar.

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”
Signature
type StatusBarPickerOption = Readonly<{
id: string;
label: string;
}>;

One choice a status bar picker offers.


StatusBarPickerPropstype alias

Section titled “StatusBarPickerProps”
Signature
type StatusBarPickerProps = object;

Props accepted by StatusBarPicker.

Signature
noun: string;

What is picked, e.g. “Computer”; the trigger is named “<noun>: <label>”.

Signature
pluralNoun: string;

The plural used for searching, e.g. “Computers”.

Signature
icon: ReactNode;

The picked thing’s mark, shown before its label.

Signature
options: readonly StatusBarPickerOption[];
Signature
value: string | null;

The selected option id; null when nothing is attached.

Signature
onSelect: (id) => void;

Called with a different option’s id.

Parameter Type
id string

void

Signature
optional emptyMessage?: ReactNode;

Shown when the list is empty, e.g. why nothing can be chosen.

Signature
optional accessibleLabel?: string;

The trigger’s accessible name; defaults to “<noun>: <label>”.

Signature
optional disabled?: boolean;
Signature
optional open?: boolean;

Host-owned popup visibility; omitted for the ordinary trigger-owned picker.

Signature
optional onOpenChange?: (open) => void;

Reports popup dismissal or trigger activation to the host.

Parameter Type
open boolean

void


StatusBarChipPropstype alias

Section titled “StatusBarChipProps”
Signature
type StatusBarChipProps = Omit<
ButtonHTMLAttributes<HTMLButtonElement>,
"children"
> &
object;

Props accepted by StatusBarChip.

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”
Signature
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()”
Signature
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.

Parameter Type
__namedParameters AppStatusBarProps

Element


AppStatusItem()function

Section titled “AppStatusItem()”
Signature
function AppStatusItem(__namedParameters): Element;

One quiet status readout.

Parameter Type
__namedParameters HTMLAttributes<HTMLSpanElement>

Element


StatusBarPicker()function

Section titled “StatusBarPicker()”
Signature
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.

Parameter Type
__namedParameters StatusBarPickerProps

Element