roots/ui API
Every export of roots/ui in Roots 0.4.0, read from runtime/ui/index.lisp when this page was built: the declaration, the docstring and the file that defines it. Declarations are TypeScript, printed by the compiler that builds the runtime. A member of a class or of an object has an entry of its own (router.push(), theme.set()). The guides explain how the pieces work together.
Explained in context: the UI kit, component by component, Theming.
Components #
Accordion #
<Accordion />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | unknown[] | undefined | |
items | readonly unknown[] | ||
multiple | boolean | ||
collapsible | boolean | true | |
headingLevel | number | 3 |
Emits: update:modelValue, change.
Defined in runtime/ui/components/navigation.lisp.
Avatar #
<Avatar />| Prop | Type | Default | Required |
|---|---|---|---|
src | string | ||
name | string | ||
size | "sm" | "md" | "lg" | "md" | |
shape | "circle" | "square" | "circle" |
Defined in runtime/ui/components/display.lisp.
Badge #
<Badge />| Prop | Type | Default | Required |
|---|---|---|---|
value | string | number | ||
variant | Tone | "primary" | |
max | number | ||
dot | boolean |
Defined in runtime/ui/components/display.lisp.
Button #
<Button />| Prop | Type | Default | Required |
|---|---|---|---|
variant | "primary" | "secondary" | "ghost" | "danger" | "primary" | |
size | "sm" | "md" | "lg" | "md" | |
type | "button" | "submit" | "reset" | "button" | |
label | string | ||
icon | string | ||
iconRight | string | ||
disabled | boolean | ||
loading | boolean | ||
block | boolean |
Emits: click.
Defined in runtime/ui/components/button.lisp.
Card #
<Card />| Prop | Type | Default | Required |
|---|---|---|---|
title | string | ||
subtitle | string | ||
variant | "outlined" | "elevated" | "filled" | "outlined" | |
headingLevel | number | 3 |
Defined in runtime/ui/components/display.lisp.
Center #
<Center />| Prop | Type | Default | Required |
|---|---|---|---|
inline | boolean |
Defined in runtime/ui/components/layout.lisp.
Checkbox #
<Checkbox />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | boolean | unknown[] | undefined | |
value | unknown | undefined | |
label | string | ||
disabled | boolean | ||
indeterminate | boolean | ||
invalid | boolean | ||
name | string |
Emits: update:modelValue, change.
Defined in runtime/ui/components/toggle.lisp.
Dialog #
<Dialog />| Prop | Type | Default | Required |
|---|---|---|---|
open | boolean | undefined | |
title | string | ||
description | string | ||
modal | boolean | true | |
dismissable | boolean | true | |
size | "sm" | "md" | "lg" | "full" | "md" | |
role | "dialog" | "alertdialog" | "dialog" | |
side | "left" | "right" | "top" | "bottom" | "right" | |
closeLabel | string | "Close" |
Emits: update:open, open, close.
Defined in runtime/ui/components/dialog.lisp.
Divider #
<Divider />| Prop | Type | Default | Required |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | |
label | string |
Defined in runtime/ui/components/display.lisp.
Drawer #
<Drawer />| Prop | Type | Default | Required |
|---|---|---|---|
open | boolean | undefined | |
title | string | ||
description | string | ||
modal | boolean | true | |
dismissable | boolean | true | |
size | string | "md" | |
role | string | "dialog" | |
side | string | "right" | |
closeLabel | string | "Close" |
Emits: update:open, open, close.
Defined in runtime/ui/components/dialog.lisp.
Field #
<Field />| Prop | Type | Default | Required |
|---|---|---|---|
label | string | ||
hint | string | ||
error | string | ||
rules | readonly Rule[] | ||
value | unknown | undefined | |
required | boolean | ||
id | string |
Defined in runtime/ui/components/field.lisp.
Form #
<Form />| Prop | Type | Default | Required |
|---|---|---|---|
label | string |
Emits: submit, invalid, reset.
Defined in runtime/ui/components/field.lisp.
Grid #
<Grid />| Prop | Type | Default | Required |
|---|---|---|---|
columns | number | 2 | |
gap | number | 2 | |
minItemWidth | number | undefined | |
items | readonly unknown[] |
Defined in runtime/ui/components/layout.lisp.
Icon #
<Icon />| Prop | Type | Default | Required |
|---|---|---|---|
name | string | yes | |
label | string | ||
size | "sm" | "md" | "lg" | "md" |
Defined in runtime/ui/components/button.lisp.
IconButton #
<IconButton />| Prop | Type | Default | Required |
|---|---|---|---|
icon | string | yes | |
label | string | ||
variant | "primary" | "secondary" | "ghost" | "danger" | "ghost" | |
size | "sm" | "md" | "lg" | "md" | |
disabled | boolean |
Emits: click.
Defined in runtime/ui/components/button.lisp.
Input #
<Input />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | string | number | undefined | |
type | "text" | "password" | "email" | "number" | "search" | "tel" | "url" | "text" | |
placeholder | string | ||
disabled | boolean | ||
readonly | boolean | ||
invalid | boolean | ||
size | "sm" | "md" | "lg" | "md" | |
autofocus | boolean | ||
maxlength | number | ||
name | string | ||
label | string |
Emits: update:modelValue, change, blur, focus.
Defined in runtime/ui/components/field.lisp.
Label #
<Label />| Prop | Type | Default | Required |
|---|---|---|---|
for | string | ||
required | boolean |
Defined in runtime/ui/components/field.lisp.
List #
<List />| Prop | Type | Default | Required |
|---|---|---|---|
items | readonly unknown[] | ||
modelValue | unknown | undefined | |
selectable | "none" | "single" | "multiple" | "none" | |
label | string |
Emits: update:modelValue, change.
Defined in runtime/ui/components/data.lisp.
Menu #
<Menu />| Prop | Type | Default | Required |
|---|---|---|---|
items | readonly (MenuItem | string)[] | ||
label | string | ||
icon | string | ||
variant | "primary" | "secondary" | "ghost" | "danger" | "secondary" | |
align | "start" | "end" | "start" |
Emits: select.
Defined in runtime/ui/components/menu.lisp.
NumberInput #
<NumberInput />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | number | null | undefined | |
min | number | undefined | |
max | number | undefined | |
step | number | 1 | |
bigStep | number | undefined | |
clearable | boolean | ||
placeholder | string | ||
disabled | boolean | ||
readonly | boolean | ||
invalid | boolean | ||
size | "sm" | "md" | "lg" | "md" | |
name | string | ||
label | string | ||
decrementLabel | string | "Decrease" | |
incrementLabel | string | "Increase" |
Emits: update:modelValue, change, blur, focus.
Defined in runtime/ui/components/number-input.lisp.
Pagination #
<Pagination />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | number | undefined | |
pageCount | number | undefined | |
total | number | undefined | |
pageSize | number | 10 | |
siblings | number | 1 | |
boundaries | number | 1 | |
disabled | boolean | ||
label | string | "Pagination" | |
previousLabel | string | "Previous page" | |
nextLabel | string | "Next page" | |
pageLabel | (a: number) => string | undefined | |
statusLabel | (a: number, b: number) => string | undefined |
Emits: update:modelValue, change.
Defined in runtime/ui/components/pagination.lisp.
Popover #
<Popover />| Prop | Type | Default | Required |
|---|---|---|---|
open | boolean | undefined | |
label | string | ||
title | string | ||
side | "top" | "bottom" | "left" | "right" | "bottom" | |
align | "start" | "end" | "start" | |
variant | "primary" | "secondary" | "ghost" | "danger" | "secondary" |
Emits: update:open.
Defined in runtime/ui/components/popover.lisp.
ProgressBar #
<ProgressBar />| Prop | Type | Default | Required |
|---|---|---|---|
value | number | 0 | |
max | number | 100 | |
indeterminate | boolean | ||
label | string | ||
showValue | boolean | ||
variant | "primary" | "success" | "warning" | "error" | "primary" |
Defined in runtime/ui/components/feedback.lisp.
Radio #
<Radio />| Prop | Type | Default | Required |
|---|---|---|---|
value | unknown | undefined | |
label | string | ||
disabled | boolean | ||
modelValue | unknown | undefined |
Emits: update:modelValue, change.
Defined in runtime/ui/components/toggle.lisp.
RadioGroup #
<RadioGroup />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | unknown | undefined | |
options | readonly unknown[] | ||
label | string | ||
disabled | boolean | ||
orientation | "horizontal" | "vertical" | "vertical" | |
name | string |
Emits: update:modelValue, change.
Defined in runtime/ui/components/toggle.lisp.
ScrollArea #
<ScrollArea />| Prop | Type | Default | Required |
|---|---|---|---|
height | number | 10 | |
fill | boolean | ||
label | string |
Defined in runtime/ui/components/scroll-area.dom.lisp.
Select #
<Select />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | unknown | undefined | |
options | readonly unknown[] | ||
placeholder | string | "Select…" | |
disabled | boolean | ||
invalid | boolean | ||
label | string | ||
size | "sm" | "md" | "lg" | "md" |
Emits: update:modelValue, change.
Defined in runtime/ui/components/menu.lisp.
Skeleton #
<Skeleton />| Prop | Type | Default | Required |
|---|---|---|---|
shape | "text" | "rect" | "circle" | "text" | |
lines | number | 1 | |
width | number | string | ||
height | number |
Defined in runtime/ui/components/feedback.lisp.
Slider #
<Slider />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | number | undefined | |
min | number | 0 | |
max | number | 100 | |
step | number | 1 | |
bigStep | number | ||
disabled | boolean | ||
label | string | ||
showValue | boolean | ||
unit | string | "" |
Emits: update:modelValue, change.
Defined in runtime/ui/components/slider.lisp.
Spinner #
<Spinner />| Prop | Type | Default | Required |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | |
label | string | "Loading" |
Defined in runtime/ui/components/feedback.lisp.
Splitter #
<Splitter />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | number | undefined | |
direction | "horizontal" | "vertical" | "horizontal" | |
min | number | 10 | |
max | number | 90 | |
step | number | 5 | |
label | string | "Resize" |
Emits: update:modelValue.
Defined in runtime/ui/components/splitter.lisp.
Stack #
<Stack />| Prop | Type | Default | Required |
|---|---|---|---|
direction | "column" | "row" | "column" | |
gap | number | 2 | |
align | "start" | "center" | "end" | "stretch" | ||
justify | "start" | "center" | "end" | "between" | "around" | ||
wrap | boolean | ||
as | string | "Box" |
Defined in runtime/ui/components/layout.lisp.
Switch #
<Switch />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | boolean | undefined | |
label | string | ||
disabled | boolean |
Emits: update:modelValue, change.
Defined in runtime/ui/components/toggle.lisp.
Table #
<Table />| Prop | Type | Default | Required |
|---|---|---|---|
columns | readonly Column[] | ||
rows | readonly Row[] | ||
rowKey | string | "id" | |
sort | SortState | null | undefined | |
page | number | undefined | |
pageSize | number | 0 | |
selection | unknown[] | undefined | |
selectionMode | "none" | "single" | "multiple" | "none" | |
label | string | ||
emptyText | string | "No data" |
Emits: update:sort, update:page, update:selection.
Defined in runtime/ui/components/data.lisp.
Tabs #
<Tabs />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | unknown | undefined | |
items | readonly unknown[] | ||
orientation | "horizontal" | "vertical" | "horizontal" | |
activation | "automatic" | "manual" | "automatic" | |
label | string |
Emits: update:modelValue, change.
Defined in runtime/ui/components/navigation.lisp.
Tag #
<Tag />| Prop | Type | Default | Required |
|---|---|---|---|
label | string | ||
variant | Tone | "neutral" | |
icon | string | ||
removable | boolean |
Emits: remove.
Defined in runtime/ui/components/display.lisp.
Textarea #
<Textarea />| Prop | Type | Default | Required |
|---|---|---|---|
modelValue | string | undefined | |
placeholder | string | ||
rows | number | 3 | |
disabled | boolean | ||
readonly | boolean | ||
invalid | boolean | ||
maxlength | number | ||
label | string |
Emits: update:modelValue, change, blur.
Defined in runtime/ui/components/textarea.dom.lisp.
Toaster #
<Toaster />| Prop | Type | Default | Required |
|---|---|---|---|
toaster | any | undefined | |
position | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "bottom-end" | |
max | number | undefined | |
label | string | "Notifications" |
Defined in runtime/ui/components/toast.lisp.
Tooltip #
<Tooltip />| Prop | Type | Default | Required |
|---|---|---|---|
text | string | ||
side | "top" | "bottom" | "left" | "right" | "top" | |
delay | number | 500 | |
disabled | boolean |
Defined in runtime/ui/components/popover.lisp.
Tree #
<Tree />| Prop | Type | Default | Required |
|---|---|---|---|
nodes | readonly TreeNode[] | ||
modelValue | unknown | undefined | |
expanded | unknown[] | undefined | |
multiple | boolean | ||
label | string |
Emits: update:modelValue, update:expanded, select.
Defined in runtime/ui/components/data.lisp.
Functions #
controllable #
function controllable<T>(
getValue: () => T | undefined,
initial: T,
onChange: ((a: T) => void) | null | undefined,
): Ref<T>A value that is controlled when GET-VALUE() is not undefined (the parent's v-model), else kept locally (starting at INITIAL). Writing it updates the local copy and calls ON-CHANGE (emit update:modelValue), so a controlled parent decides what happens.
Defined in runtime/ui/headless/base.lisp.
createToaster #
function createToaster(options?: { max?: number; duration?: number; errorDuration?: number; set?: (a: () => void, b: number) => unknown; clear?: (a: unknown) => void; now?: () => number }): ToasterA toast queue showing at most MAX toasts (the oldest leave first). DURATION and ERROR-DURATION are the defaults of a toast without one of its own (ms; 0: it stays until dismissed). SET/CLEAR/NOW are the timer functions (tests pass fake ones).
Defaults: max 5, duration 5000, errorDuration 10000, set setTimer, clear clearTimer, now (computed).
Defined in runtime/ui/headless/toast.lisp.
createUI #
function createUI(config?: UiConfig): { install(app: any): void }A plugin: app.use(createUI({ unstyled: true, pt: { button: { root: { class: 'x' } } } })).
Defined in runtime/ui/kit.lisp.
handleKey #
function handleKey(
table: KeyTable,
e: any,
actions: KeyActions,
conditions?: Conditions,
): booleanRun the action of the binding matching E. The event's default action is prevented (and it stops bubbling) unless the action returns false. True when an action handled it.
Defined in runtime/ui/headless/base.lisp.
iconNames #
function iconNames(): string[]Defined in runtime/ui/icons.lisp.
initials #
function initials(name: string | undefined): string"Ada Lovelace" → "AL"; one word → its first two letters.
Defined in runtime/ui/components/display.lisp.
matchKey #
function matchKey(table: KeyTable, e: any, conditions?: Conditions): KeyBinding | nullThe first binding of TABLE that matches the keyboard event E under CONDITIONS, or null.
Defined in runtime/ui/headless/base.lisp.
provideUI #
function provideUI(config: UiConfig): voidInside setup(): defaults for the components below this one.
Defined in runtime/ui/kit.lisp.
registerIcon #
function registerIcon(name: string, def: IconDef): voidAdd or replace an icon: registerIcon('rocket', { path: 'M…', glyph: '^', ascii: '^' }).
Defined in runtime/ui/icons.lisp.
useToast #
function useToast(toaster?: ToastStore | undefined): ToastApiShow toasts from anywhere: useToast().success("Saved"). TOASTER: a toaster made with createToaster() (default: the app-wide one that <Toaster/> shows).
Defined in runtime/ui/components/toast.lisp.
Constants #
ACCORDION_KEYS #
const ACCORDION_KEYS: KeyTableKeyboard table of Accordion (WAI-ARIA APG: accordion).
Defined in runtime/ui/headless/collection.lisp.
BUTTON_KEYS #
const BUTTON_KEYS: KeyTableKeyboard table of Button and IconButton (WAI-ARIA APG: button).
Defined in runtime/ui/headless/toggle.lisp.
CHECKBOX_KEYS #
const CHECKBOX_KEYS: KeyTableKeyboard table of Checkbox (WAI-ARIA APG: checkbox).
Defined in runtime/ui/headless/toggle.lisp.
DIALOG_KEYS #
const DIALOG_KEYS: KeyTableKeyboard table of Dialog and Drawer (WAI-ARIA APG: dialog (modal)).
Defined in runtime/ui/headless/overlay.lisp.
LISTBOX_KEYS #
const LISTBOX_KEYS: KeyTableKeyboard table of List and of the Select popup (WAI-ARIA APG: listbox).
Defined in runtime/ui/headless/collection.lisp.
MENU_BUTTON_KEYS #
const MENU_BUTTON_KEYS: KeyTableKeyboard table of the button that opens a Menu.
Defined in runtime/ui/headless/collection.lisp.
MENU_KEYS #
const MENU_KEYS: KeyTableKeyboard table of an open Menu (WAI-ARIA APG: menu button).
Defined in runtime/ui/headless/collection.lisp.
NUMBER_INPUT_KEYS #
const NUMBER_INPUT_KEYS: KeyTableKeyboard table of NumberInput (WAI-ARIA APG: spinbutton).
Defined in runtime/ui/headless/range.lisp.
PAGINATION_KEYS #
const PAGINATION_KEYS: KeyTableKeyboard table of Pagination.
Defined in runtime/ui/headless/pagination.lisp.
RADIO_GROUP_KEYS #
const RADIO_GROUP_KEYS: KeyTableKeyboard table of RadioGroup (WAI-ARIA APG: radio group).
Defined in runtime/ui/headless/collection.lisp.
rules #
const rulesBuilt-in validation rules: rules.required(), rules.minLength(3), rules.email() …
Defined in runtime/ui/headless/form.lisp.
SCROLL_KEYS #
const SCROLL_KEYS: KeyTableKeyboard table of a focused ScrollArea (native scrolling on the DOM).
Defined in runtime/ui/headless/range.lisp.
SELECT_KEYS #
const SELECT_KEYS: KeyTableKeyboard table of the Select trigger and popup; inside the popup the listbox table applies, and choosing an option closes it.
Defined in runtime/ui/headless/collection.lisp.
SLIDER_KEYS #
const SLIDER_KEYS: KeyTableKeyboard table of Slider (WAI-ARIA APG: slider).
Defined in runtime/ui/headless/range.lisp.
SPLITTER_KEYS #
const SPLITTER_KEYS: KeyTableKeyboard table of Splitter (WAI-ARIA APG: window splitter).
Defined in runtime/ui/headless/range.lisp.
SWITCH_KEYS #
const SWITCH_KEYS: KeyTableKeyboard table of Switch (WAI-ARIA APG: switch).
Defined in runtime/ui/headless/toggle.lisp.
TABLE_KEYS #
const TABLE_KEYS: KeyTableKeyboard table of Table.
Defined in runtime/ui/headless/table.lisp.
TABS_KEYS #
const TABS_KEYS: KeyTableKeyboard table of Tabs (WAI-ARIA APG: tabs). With automatic activation, moving the focus also selects.
Defined in runtime/ui/headless/collection.lisp.
TOAST_KEYS #
const TOAST_KEYS: KeyTableKeyboard table of a toast (the region is role=region, each toast role=status or alert).
Defined in runtime/ui/headless/toast.lisp.
TOOLTIP_KEYS #
const TOOLTIP_KEYS: KeyTableKeyboard table of Tooltip (WAI-ARIA APG: tooltip). It opens on hover and on focus.
Defined in runtime/ui/headless/overlay.lisp.
TREE_KEYS #
const TREE_KEYS: KeyTableKeyboard table of Tree (WAI-ARIA APG: tree view).
Defined in runtime/ui/headless/tree.lisp.
Types #
AccordionProps #
interface AccordionProps extends CommonProps {
modelValue?: unknown[];
items?: readonly unknown[];
multiple?: boolean;
collapsible?: boolean;
headingLevel?: number;
}Defined in runtime/ui/components/navigation.lisp.
AvatarProps #
interface AvatarProps extends CommonProps {
src?: string;
name?: string;
size?: "sm" | "md" | "lg";
shape?: "circle" | "square";
}Defined in runtime/ui/components/display.lisp.
BadgeProps #
interface BadgeProps extends CommonProps {
value?: string | number;
variant?: Tone;
max?: number;
dot?: boolean;
}Defined in runtime/ui/components/display.lisp.
ButtonProps #
interface ButtonProps extends CommonProps {
variant?: "primary" | "secondary" | "ghost" | "danger";
size?: "sm" | "md" | "lg";
type?: "button" | "submit" | "reset";
label?: string;
icon?: string;
iconRight?: string;
disabled?: boolean;
loading?: boolean;
block?: boolean;
}Defined in runtime/ui/components/button.lisp.
CardProps #
interface CardProps extends CommonProps {
title?: string;
subtitle?: string;
variant?: "outlined" | "elevated" | "filled";
headingLevel?: number;
}Defined in runtime/ui/components/display.lisp.
CenterProps #
interface CenterProps extends CommonProps {
inline?: boolean;
}Defined in runtime/ui/components/layout.lisp.
CheckboxProps #
interface CheckboxProps extends CommonProps {
modelValue?: boolean | unknown[];
value?: unknown;
label?: string;
disabled?: boolean;
indeterminate?: boolean;
invalid?: boolean;
name?: string;
}Defined in runtime/ui/components/toggle.lisp.
Column #
interface Column {
key: string;
label?: string;
sortable?: boolean;
width?: number;
align?: "left" | "center" | "right";
compare?(a: unknown, b: unknown, rowA: Row, rowB: Row): number;
}KEY: the row property; LABEL: the header; SORTABLE; WIDTH (cells / steps); ALIGN; COMPARE(a, b, rowA, rowB): a custom order: A and B are the two rows' values of this column (row[key]), ROW-A and ROW-B the rows themselves.
Defined in runtime/ui/headless/table.lisp.
CommonProps #
interface CommonProps {
pt?: { [part: string]: unknown };
unstyled?: boolean;
}PT: pass-through attributes per part ({ root: { class, style, aria-, data-, onX } }, or a function ({ props, state }) → that object). UNSTYLED: no skin classes.
Defined in runtime/ui/kit.lisp.
DialogProps #
interface DialogProps extends CommonProps {
open?: boolean;
title?: string;
description?: string;
modal?: boolean;
dismissable?: boolean;
size?: "sm" | "md" | "lg" | "full";
role?: "dialog" | "alertdialog";
side?: "left" | "right" | "top" | "bottom";
closeLabel?: string;
}Defined in runtime/ui/components/dialog.lisp.
DividerProps #
interface DividerProps extends CommonProps {
orientation?: "horizontal" | "vertical";
label?: string;
}Defined in runtime/ui/components/display.lisp.
FieldProps #
interface FieldProps extends CommonProps {
label?: string;
hint?: string;
error?: string;
rules?: readonly Rule[];
value?: unknown;
required?: boolean;
id?: string;
}Defined in runtime/ui/components/field.lisp.
FormProps #
interface FormProps extends CommonProps {
label?: string;
}Defined in runtime/ui/components/field.lisp.
GridProps #
interface GridProps extends CommonProps {
columns?: number;
gap?: number;
minItemWidth?: number;
items?: readonly unknown[];
}Defined in runtime/ui/components/layout.lisp.
IconButtonProps #
interface IconButtonProps extends CommonProps {
icon: string;
label: string;
variant?: "primary" | "secondary" | "ghost" | "danger";
size?: "sm" | "md" | "lg";
disabled?: boolean;
}Defined in runtime/ui/components/button.lisp.
IconProps #
interface IconProps extends CommonProps {
name: string;
label?: string;
size?: "sm" | "md" | "lg";
}Defined in runtime/ui/components/button.lisp.
InputProps #
interface InputProps extends CommonProps {
modelValue?: string | number;
type?: "text" | "password" | "email" | "number" | "search" | "tel" | "url";
placeholder?: string;
disabled?: boolean;
readonly?: boolean;
invalid?: boolean;
size?: "sm" | "md" | "lg";
autofocus?: boolean;
maxlength?: number;
name?: string;
label?: string;
}Defined in runtime/ui/components/field.lisp.
Item #
interface Item {
value: unknown;
label?: string;
disabled?: boolean;
}An entry of a collection: VALUE identifies it (string or number), LABEL is shown and used by typeahead, DISABLED items are skipped by the keyboard and cannot be chosen.
Defined in runtime/ui/headless/collection.lisp.
KeyBinding #
interface KeyBinding {
readonly key: string;
readonly action: string;
readonly when?: string;
readonly shift?: boolean;
readonly ctrl?: boolean;
readonly alt?: boolean;
readonly meta?: boolean;
readonly note?: string;
}One row of a keyboard interaction table. KEY is a KeyboardEvent.key ("ArrowDown", " ", "Escape") or "printable" (any single printable character, for typeahead). WHEN names a condition that must hold ("horizontal", "open"…). SHIFT, CTRL, ALT and META must match when given; when left out, ctrl/alt/meta must be up and shift is free.
Defined in runtime/ui/headless/base.lisp.
KeyTable #
type KeyTable = readonly KeyBinding[];Defined in runtime/ui/headless/base.lisp.
LabelProps #
interface LabelProps extends CommonProps {
for?: string;
required?: boolean;
}Defined in runtime/ui/components/field.lisp.
ListProps #
interface ListProps extends CommonProps {
items?: readonly unknown[];
modelValue?: unknown;
selectable?: "none" | "single" | "multiple";
label?: string;
}Defined in runtime/ui/components/data.lisp.
MenuItem #
interface MenuItem {
value?: unknown;
label?: string;
icon?: string;
disabled?: boolean;
danger?: boolean;
separator?: boolean;
type?: "radio" | "checkbox";
checked?: boolean;
}Defined in runtime/ui/components/menu.lisp.
MenuProps #
interface MenuProps extends CommonProps {
items?: readonly (MenuItem | string)[];
label?: string;
icon?: string;
variant?: "primary" | "secondary" | "ghost" | "danger";
align?: "start" | "end";
}Defined in runtime/ui/components/menu.lisp.
NumberInputProps #
interface NumberInputProps extends CommonProps {
modelValue?: number | null;
min?: number;
max?: number;
step?: number;
bigStep?: number;
clearable?: boolean;
placeholder?: string;
disabled?: boolean;
readonly?: boolean;
invalid?: boolean;
size?: "sm" | "md" | "lg";
name?: string;
label?: string;
decrementLabel?: string;
incrementLabel?: string;
}Defined in runtime/ui/components/number-input.lisp.
PageEntry #
interface PageEntry {
type: "page" | "gap";
page: number;
key: string;
}One slot of the pager: a page button (TYPE "page"), or a gap ("gap", PAGE 0).
Defined in runtime/ui/headless/pagination.lisp.
PaginationProps #
interface PaginationProps extends CommonProps {
modelValue?: number;
pageCount?: number;
total?: number;
pageSize?: number;
siblings?: number;
boundaries?: number;
disabled?: boolean;
label?: string;
previousLabel?: string;
nextLabel?: string;
pageLabel?: (a: number) => string;
statusLabel?: (a: number, b: number) => string;
}Defined in runtime/ui/components/pagination.lisp.
PopoverProps #
interface PopoverProps extends CommonProps {
open?: boolean;
label?: string;
title?: string;
side?: "top" | "bottom" | "left" | "right";
align?: "start" | "end";
variant?: "primary" | "secondary" | "ghost" | "danger";
}Defined in runtime/ui/components/popover.lisp.
ProgressBarProps #
interface ProgressBarProps extends CommonProps {
value?: number;
max?: number;
indeterminate?: boolean;
label?: string;
showValue?: boolean;
variant?: "primary" | "success" | "warning" | "error";
}Defined in runtime/ui/components/feedback.lisp.
RadioGroupProps #
interface RadioGroupProps extends CommonProps {
modelValue?: unknown;
options?: readonly unknown[];
label?: string;
disabled?: boolean;
orientation?: "horizontal" | "vertical";
name?: string;
}Defined in runtime/ui/components/toggle.lisp.
RadioProps #
interface RadioProps extends CommonProps {
value?: unknown;
label?: string;
disabled?: boolean;
modelValue?: unknown;
}Defined in runtime/ui/components/toggle.lisp.
Row #
type Row = { [key: string]: unknown };Defined in runtime/ui/headless/table.lisp.
Rule #
type Rule = (a: unknown) => boolean | string;Defined in runtime/ui/headless/form.lisp.
ScrollAreaProps #
interface ScrollAreaProps extends CommonProps {
height?: number;
fill?: boolean;
label?: string;
}Defined in runtime/ui/components/scroll-area.dom.lisp.
SelectProps #
interface SelectProps extends CommonProps {
modelValue?: unknown;
options?: readonly unknown[];
placeholder?: string;
disabled?: boolean;
invalid?: boolean;
label?: string;
size?: "sm" | "md" | "lg";
}Defined in runtime/ui/components/menu.lisp.
SkeletonProps #
interface SkeletonProps extends CommonProps {
shape?: "text" | "rect" | "circle";
lines?: number;
width?: number | string;
height?: number;
}Defined in runtime/ui/components/feedback.lisp.
SliderProps #
interface SliderProps extends CommonProps {
modelValue?: number;
min?: number;
max?: number;
step?: number;
bigStep?: number;
disabled?: boolean;
label?: string;
showValue?: boolean;
unit?: string;
}Defined in runtime/ui/components/slider.lisp.
SortState #
interface SortState {
key: string;
direction: SortDirection;
}Defined in runtime/ui/headless/table.lisp.
SpinnerProps #
interface SpinnerProps extends CommonProps {
size?: "sm" | "md" | "lg";
label?: string;
}Defined in runtime/ui/components/feedback.lisp.
SplitterProps #
interface SplitterProps extends CommonProps {
modelValue?: number;
direction?: "horizontal" | "vertical";
min?: number;
max?: number;
step?: number;
label?: string;
}Defined in runtime/ui/components/splitter.lisp.
StackProps #
interface StackProps extends CommonProps {
direction?: "column" | "row";
gap?: number;
align?: "start" | "center" | "end" | "stretch";
justify?: "start" | "center" | "end" | "between" | "around";
wrap?: boolean;
as?: string;
}Defined in runtime/ui/components/layout.lisp.
SwitchProps #
interface SwitchProps extends CommonProps {
modelValue?: boolean;
label?: string;
disabled?: boolean;
}Defined in runtime/ui/components/toggle.lisp.
TableProps #
interface TableProps extends CommonProps {
columns?: readonly Column[];
rows?: readonly Row[];
rowKey?: string;
sort?: SortState | null;
page?: number;
pageSize?: number;
selection?: unknown[];
selectionMode?: "none" | "single" | "multiple";
label?: string;
emptyText?: string;
}Defined in runtime/ui/components/data.lisp.
TabsProps #
interface TabsProps extends CommonProps {
modelValue?: unknown;
items?: readonly unknown[];
orientation?: "horizontal" | "vertical";
activation?: "automatic" | "manual";
label?: string;
}Defined in runtime/ui/components/navigation.lisp.
TagProps #
interface TagProps extends CommonProps {
label?: string;
variant?: Tone;
icon?: string;
removable?: boolean;
}Defined in runtime/ui/components/display.lisp.
TextareaProps #
interface TextareaProps extends CommonProps {
modelValue?: string;
placeholder?: string;
rows?: number;
disabled?: boolean;
readonly?: boolean;
invalid?: boolean;
maxlength?: number;
label?: string;
}Defined in runtime/ui/components/textarea.dom.lisp.
Toast #
interface Toast {
readonly id: number;
readonly key: string | number | undefined;
title: string;
description: string;
variant: ToastVariant;
duration: number;
actionLabel: string;
onAction?(): void;
}Defined in runtime/ui/headless/toast.lisp.
ToastApi #
interface ToastApi {
readonly toasts: Ref<Toast[]>;
show(options: ToastOptions | string): number;
info(title: string, description?: string): number;
success(title: string, description?: string): number;
warning(title: string, description?: string): number;
error(title: string, description?: string): number;
dismiss(id: number): void;
dismissNewest(): boolean;
clear(): void;
}Defined in runtime/ui/components/toast.lisp.
ToasterProps #
interface ToasterProps extends CommonProps {
toaster?: any;
position?: "top-start" | "top-end" | "bottom-start" | "bottom-end";
max?: number;
label?: string;
}Defined in runtime/ui/components/toast.lisp.
ToastOptions #
interface ToastOptions {
title?: string;
description?: string;
variant?: ToastVariant;
duration?: number;
key?: string | number;
actionLabel?: string;
onAction?(): void;
}Defined in runtime/ui/headless/toast.lisp.
Tone #
type Tone = "neutral" | "primary" | "success" | "warning" | "error" | "info";Defined in runtime/ui/components/display.lisp.
TooltipProps #
interface TooltipProps extends CommonProps {
text?: string;
side?: "top" | "bottom" | "left" | "right";
delay?: number;
disabled?: boolean;
}Defined in runtime/ui/components/popover.lisp.
TreeNode #
interface TreeNode {
id: unknown;
label: string;
children?: readonly TreeNode[];
disabled?: boolean;
}Defined in runtime/ui/headless/tree.lisp.
TreeProps #
interface TreeProps extends CommonProps {
nodes?: readonly TreeNode[];
modelValue?: unknown;
expanded?: unknown[];
multiple?: boolean;
label?: string;
}Defined in runtime/ui/components/data.lisp.
UiConfig #
interface UiConfig {
unstyled?: boolean;
pt?: { [component: string]: unknown };
}App-wide defaults: UNSTYLED drops every skin class; PT maps a component ("button") to its pass-through per part ({ root: { class: "…" } }).
Defined in runtime/ui/kit.lisp.