Skip to the contentSkip to the navigation
RootsGitHubMenu
On this page

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 />
PropTypeDefaultRequired
modelValueunknown[]undefined
itemsreadonly unknown[]
multipleboolean
collapsiblebooleantrue
headingLevelnumber3

Emits: update:modelValue, change.

Defined in runtime/ui/components/navigation.lisp.

Avatar #

<Avatar />
PropTypeDefaultRequired
srcstring
namestring
size"sm" | "md" | "lg""md"
shape"circle" | "square""circle"

Defined in runtime/ui/components/display.lisp.

Badge #

<Badge />
PropTypeDefaultRequired
valuestring | number
variantTone"primary"
maxnumber
dotboolean

Defined in runtime/ui/components/display.lisp.

Button #

<Button />
PropTypeDefaultRequired
variant"primary" | "secondary" | "ghost" | "danger""primary"
size"sm" | "md" | "lg""md"
type"button" | "submit" | "reset""button"
labelstring
iconstring
iconRightstring
disabledboolean
loadingboolean
blockboolean

Emits: click.

Defined in runtime/ui/components/button.lisp.

Card #

<Card />
PropTypeDefaultRequired
titlestring
subtitlestring
variant"outlined" | "elevated" | "filled""outlined"
headingLevelnumber3

Defined in runtime/ui/components/display.lisp.

Center #

<Center />
PropTypeDefaultRequired
inlineboolean

Defined in runtime/ui/components/layout.lisp.

Checkbox #

<Checkbox />
PropTypeDefaultRequired
modelValueboolean | unknown[]undefined
valueunknownundefined
labelstring
disabledboolean
indeterminateboolean
invalidboolean
namestring

Emits: update:modelValue, change.

Defined in runtime/ui/components/toggle.lisp.

Dialog #

<Dialog />
PropTypeDefaultRequired
openbooleanundefined
titlestring
descriptionstring
modalbooleantrue
dismissablebooleantrue
size"sm" | "md" | "lg" | "full""md"
role"dialog" | "alertdialog""dialog"
side"left" | "right" | "top" | "bottom""right"
closeLabelstring"Close"

Emits: update:open, open, close.

Defined in runtime/ui/components/dialog.lisp.

Divider #

<Divider />
PropTypeDefaultRequired
orientation"horizontal" | "vertical""horizontal"
labelstring

Defined in runtime/ui/components/display.lisp.

Drawer #

<Drawer />
PropTypeDefaultRequired
openbooleanundefined
titlestring
descriptionstring
modalbooleantrue
dismissablebooleantrue
sizestring"md"
rolestring"dialog"
sidestring"right"
closeLabelstring"Close"

Emits: update:open, open, close.

Defined in runtime/ui/components/dialog.lisp.

Field #

<Field />
PropTypeDefaultRequired
labelstring
hintstring
errorstring
rulesreadonly Rule[]
valueunknownundefined
requiredboolean
idstring

Defined in runtime/ui/components/field.lisp.

Form #

<Form />
PropTypeDefaultRequired
labelstring

Emits: submit, invalid, reset.

Defined in runtime/ui/components/field.lisp.

Grid #

<Grid />
PropTypeDefaultRequired
columnsnumber2
gapnumber2
minItemWidthnumberundefined
itemsreadonly unknown[]

Defined in runtime/ui/components/layout.lisp.

Icon #

<Icon />
PropTypeDefaultRequired
namestringyes
labelstring
size"sm" | "md" | "lg""md"

Defined in runtime/ui/components/button.lisp.

IconButton #

<IconButton />
PropTypeDefaultRequired
iconstringyes
labelstring
variant"primary" | "secondary" | "ghost" | "danger""ghost"
size"sm" | "md" | "lg""md"
disabledboolean

Emits: click.

Defined in runtime/ui/components/button.lisp.

Input #

<Input />
PropTypeDefaultRequired
modelValuestring | numberundefined
type"text" | "password" | "email" | "number" | "search" | "tel" | "url""text"
placeholderstring
disabledboolean
readonlyboolean
invalidboolean
size"sm" | "md" | "lg""md"
autofocusboolean
maxlengthnumber
namestring
labelstring

Emits: update:modelValue, change, blur, focus.

Defined in runtime/ui/components/field.lisp.

Label #

<Label />
PropTypeDefaultRequired
forstring
requiredboolean

Defined in runtime/ui/components/field.lisp.

List #

<List />
PropTypeDefaultRequired
itemsreadonly unknown[]
modelValueunknownundefined
selectable"none" | "single" | "multiple""none"
labelstring

Emits: update:modelValue, change.

Defined in runtime/ui/components/data.lisp.

<Menu />
PropTypeDefaultRequired
itemsreadonly (MenuItem | string)[]
labelstring
iconstring
variant"primary" | "secondary" | "ghost" | "danger""secondary"
align"start" | "end""start"

Emits: select.

Defined in runtime/ui/components/menu.lisp.

NumberInput #

<NumberInput />
PropTypeDefaultRequired
modelValuenumber | nullundefined
minnumberundefined
maxnumberundefined
stepnumber1
bigStepnumberundefined
clearableboolean
placeholderstring
disabledboolean
readonlyboolean
invalidboolean
size"sm" | "md" | "lg""md"
namestring
labelstring
decrementLabelstring"Decrease"
incrementLabelstring"Increase"

Emits: update:modelValue, change, blur, focus.

Defined in runtime/ui/components/number-input.lisp.

Pagination #

<Pagination />
PropTypeDefaultRequired
modelValuenumberundefined
pageCountnumberundefined
totalnumberundefined
pageSizenumber10
siblingsnumber1
boundariesnumber1
disabledboolean
labelstring"Pagination"
previousLabelstring"Previous page"
nextLabelstring"Next page"
pageLabel(a: number) => stringundefined
statusLabel(a: number, b: number) => stringundefined

Emits: update:modelValue, change.

Defined in runtime/ui/components/pagination.lisp.

Popover #

<Popover />
PropTypeDefaultRequired
openbooleanundefined
labelstring
titlestring
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 />
PropTypeDefaultRequired
valuenumber0
maxnumber100
indeterminateboolean
labelstring
showValueboolean
variant"primary" | "success" | "warning" | "error""primary"

Defined in runtime/ui/components/feedback.lisp.

Radio #

<Radio />
PropTypeDefaultRequired
valueunknownundefined
labelstring
disabledboolean
modelValueunknownundefined

Emits: update:modelValue, change.

Defined in runtime/ui/components/toggle.lisp.

RadioGroup #

<RadioGroup />
PropTypeDefaultRequired
modelValueunknownundefined
optionsreadonly unknown[]
labelstring
disabledboolean
orientation"horizontal" | "vertical""vertical"
namestring

Emits: update:modelValue, change.

Defined in runtime/ui/components/toggle.lisp.

ScrollArea #

<ScrollArea />
PropTypeDefaultRequired
heightnumber10
fillboolean
labelstring

Defined in runtime/ui/components/scroll-area.dom.lisp.

Select #

<Select />
PropTypeDefaultRequired
modelValueunknownundefined
optionsreadonly unknown[]
placeholderstring"Select…"
disabledboolean
invalidboolean
labelstring
size"sm" | "md" | "lg""md"

Emits: update:modelValue, change.

Defined in runtime/ui/components/menu.lisp.

Skeleton #

<Skeleton />
PropTypeDefaultRequired
shape"text" | "rect" | "circle""text"
linesnumber1
widthnumber | string
heightnumber

Defined in runtime/ui/components/feedback.lisp.

Slider #

<Slider />
PropTypeDefaultRequired
modelValuenumberundefined
minnumber0
maxnumber100
stepnumber1
bigStepnumber
disabledboolean
labelstring
showValueboolean
unitstring""

Emits: update:modelValue, change.

Defined in runtime/ui/components/slider.lisp.

Spinner #

<Spinner />
PropTypeDefaultRequired
size"sm" | "md" | "lg""md"
labelstring"Loading"

Defined in runtime/ui/components/feedback.lisp.

Splitter #

<Splitter />
PropTypeDefaultRequired
modelValuenumberundefined
direction"horizontal" | "vertical""horizontal"
minnumber10
maxnumber90
stepnumber5
labelstring"Resize"

Emits: update:modelValue.

Defined in runtime/ui/components/splitter.lisp.

Stack #

<Stack />
PropTypeDefaultRequired
direction"column" | "row""column"
gapnumber2
align"start" | "center" | "end" | "stretch"
justify"start" | "center" | "end" | "between" | "around"
wrapboolean
asstring"Box"

Defined in runtime/ui/components/layout.lisp.

Switch #

<Switch />
PropTypeDefaultRequired
modelValuebooleanundefined
labelstring
disabledboolean

Emits: update:modelValue, change.

Defined in runtime/ui/components/toggle.lisp.

Table #

<Table />
PropTypeDefaultRequired
columnsreadonly Column[]
rowsreadonly Row[]
rowKeystring"id"
sortSortState | nullundefined
pagenumberundefined
pageSizenumber0
selectionunknown[]undefined
selectionMode"none" | "single" | "multiple""none"
labelstring
emptyTextstring"No data"

Emits: update:sort, update:page, update:selection.

Defined in runtime/ui/components/data.lisp.

Tabs #

<Tabs />
PropTypeDefaultRequired
modelValueunknownundefined
itemsreadonly unknown[]
orientation"horizontal" | "vertical""horizontal"
activation"automatic" | "manual""automatic"
labelstring

Emits: update:modelValue, change.

Defined in runtime/ui/components/navigation.lisp.

Tag #

<Tag />
PropTypeDefaultRequired
labelstring
variantTone"neutral"
iconstring
removableboolean

Emits: remove.

Defined in runtime/ui/components/display.lisp.

Textarea #

<Textarea />
PropTypeDefaultRequired
modelValuestringundefined
placeholderstring
rowsnumber3
disabledboolean
readonlyboolean
invalidboolean
maxlengthnumber
labelstring

Emits: update:modelValue, change, blur.

Defined in runtime/ui/components/textarea.dom.lisp.

Toaster #

<Toaster />
PropTypeDefaultRequired
toasteranyundefined
position"top-start" | "top-end" | "bottom-start" | "bottom-end""bottom-end"
maxnumberundefined
labelstring"Notifications"

Defined in runtime/ui/components/toast.lisp.

Tooltip #

<Tooltip />
PropTypeDefaultRequired
textstring
side"top" | "bottom" | "left" | "right""top"
delaynumber500
disabledboolean

Defined in runtime/ui/components/popover.lisp.

Tree #

<Tree />
PropTypeDefaultRequired
nodesreadonly TreeNode[]
modelValueunknownundefined
expandedunknown[]undefined
multipleboolean
labelstring

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 }): Toaster

A 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,
): boolean

Run 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 | null

The 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): void

Inside setup(): defaults for the components below this one.

Defined in runtime/ui/kit.lisp.

registerIcon #

function registerIcon(name: string, def: IconDef): void

Add or replace an icon: registerIcon('rocket', { path: 'M…', glyph: '^', ascii: '^' }).

Defined in runtime/ui/icons.lisp.

useToast #

function useToast(toaster?: ToastStore | undefined): ToastApi

Show 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: KeyTable

Keyboard table of Accordion (WAI-ARIA APG: accordion).

Defined in runtime/ui/headless/collection.lisp.

BUTTON_KEYS #

const BUTTON_KEYS: KeyTable

Keyboard table of Button and IconButton (WAI-ARIA APG: button).

Defined in runtime/ui/headless/toggle.lisp.

CHECKBOX_KEYS #

const CHECKBOX_KEYS: KeyTable

Keyboard table of Checkbox (WAI-ARIA APG: checkbox).

Defined in runtime/ui/headless/toggle.lisp.

DIALOG_KEYS #

const DIALOG_KEYS: KeyTable

Keyboard table of Dialog and Drawer (WAI-ARIA APG: dialog (modal)).

Defined in runtime/ui/headless/overlay.lisp.

LISTBOX_KEYS #

const LISTBOX_KEYS: KeyTable

Keyboard table of List and of the Select popup (WAI-ARIA APG: listbox).

Defined in runtime/ui/headless/collection.lisp.

const MENU_BUTTON_KEYS: KeyTable

Keyboard table of the button that opens a Menu.

Defined in runtime/ui/headless/collection.lisp.

const MENU_KEYS: KeyTable

Keyboard table of an open Menu (WAI-ARIA APG: menu button).

Defined in runtime/ui/headless/collection.lisp.

NUMBER_INPUT_KEYS #

const NUMBER_INPUT_KEYS: KeyTable

Keyboard table of NumberInput (WAI-ARIA APG: spinbutton).

Defined in runtime/ui/headless/range.lisp.

PAGINATION_KEYS #

const PAGINATION_KEYS: KeyTable

Keyboard table of Pagination.

Defined in runtime/ui/headless/pagination.lisp.

RADIO_GROUP_KEYS #

const RADIO_GROUP_KEYS: KeyTable

Keyboard table of RadioGroup (WAI-ARIA APG: radio group).

Defined in runtime/ui/headless/collection.lisp.

rules #

const rules

Built-in validation rules: rules.required(), rules.minLength(3), rules.email() …

Defined in runtime/ui/headless/form.lisp.

SCROLL_KEYS #

const SCROLL_KEYS: KeyTable

Keyboard table of a focused ScrollArea (native scrolling on the DOM).

Defined in runtime/ui/headless/range.lisp.

SELECT_KEYS #

const SELECT_KEYS: KeyTable

Keyboard 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: KeyTable

Keyboard table of Slider (WAI-ARIA APG: slider).

Defined in runtime/ui/headless/range.lisp.

SPLITTER_KEYS #

const SPLITTER_KEYS: KeyTable

Keyboard table of Splitter (WAI-ARIA APG: window splitter).

Defined in runtime/ui/headless/range.lisp.

SWITCH_KEYS #

const SWITCH_KEYS: KeyTable

Keyboard table of Switch (WAI-ARIA APG: switch).

Defined in runtime/ui/headless/toggle.lisp.

TABLE_KEYS #

const TABLE_KEYS: KeyTable

Keyboard table of Table.

Defined in runtime/ui/headless/table.lisp.

TABS_KEYS #

const TABS_KEYS: KeyTable

Keyboard 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: KeyTable

Keyboard 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: KeyTable

Keyboard 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: KeyTable

Keyboard 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.

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.

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.