npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@molecule/app-ui-svelte

v1.12.4

Published

Svelte UI components for molecule.dev

Readme

@molecule/app-ui-svelte

Svelte UI components and class generators for molecule.dev.

The package exports one Svelte 5 component per React component in @molecule/app-ui-react, under the same React name, with the same props, rendered DOM and behavior: Button, Card (with CardHeader, CardTitle, CardDescription, CardContent, CardFooter), Input, Textarea, Select, Checkbox, RadioGroup, Switch, FloatingInput, Form, FormField, Modal, ConfirmDialog, PromptDialog, Tooltip, Dropdown (with DropdownLabel, DropdownSeparator), Tabs, Table, Pagination, Accordion, Alert, Avatar, Badge, Progress, Skeleton, SkeletonText, SkeletonCircle, Spinner, Separator, Spacer, Container, Flex, Grid, PageHeader, PageShell, EmptyState, Icon, Toast (with ToastProvider, ToastContainer), ThemeToggle, LanguagePicker, AuthGuard, ConfirmButton, OptimisticToggleButton, PanelCloseProvider, SidebarUserCard, UserMenu, UserMenuPopover (with UserMenuPopoverTrigger, UserMenuPopoverPanel, UserMenuPopoverSignOut) and the ResponsiveAppShell family (ResponsiveAppShellContent, ResponsiveAppShellTopBar, ResponsiveAppShellSidebar, ResponsiveAppShellDrawer), plus the hooks useIsDesktop, useToast, usePanelClose and useUserMenuPopoverClose.

It also keeps the original pure TypeScript CLASS GENERATORS (plus variant maps and helpers like cn and getIconData) for teams that write their own markup: getButtonClasses, getCardClasses, getModalContentClasses, getInputClasses, and one generator family per @molecule/app-ui component interface. The components call the same generators, so both paths produce identical ClassMap-resolved class strings.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

<script lang="ts">
  import { setClassMap } from '@molecule/app-ui'
  import { classMap } from '@molecule/app-ui-tailwind'
  import { Button, Card, CardHeader, CardTitle, CardContent } from '@molecule/app-ui-svelte'

  // Once at app startup (root layout), before anything renders:
  setClassMap(classMap)
</script>

<Card>
  <CardHeader><CardTitle>Projects</CardTitle></CardHeader>
  <CardContent><Button variant="solid" color="primary">New project</Button></CardContent>
</Card>

And the generator form:

<script lang="ts">
  import { getButtonClasses } from '@molecule/app-ui-svelte'

  let { variant = 'solid' as 'solid' | 'outline', children, onclick } = $props()
  const classes = $derived(getButtonClasses({ variant, color: 'primary', size: 'md' }))
</script>

<button class={classes} {onclick}>{@render children?.()}</button>

Type

framework

Installation

npm install @molecule/app-ui-svelte @molecule/app-filesystem @molecule/app-i18n @molecule/app-icons @molecule/app-inline-style-dom @molecule/app-overlay-dom @molecule/app-pointer-events-dom @molecule/app-svelte @molecule/app-ui svelte

API

Interfaces

KitFieldChangeEvent

Both targets expose the field's string value during the callback.

interface KitFieldChangeEvent extends KitEvent {
  /** The edited field, or its value snapshot on a device. */
  readonly target: EventTarget & { value: string }
  /** The field handling the change. */
  readonly currentTarget: KitFieldChangeEvent['target']
}

CSSProperties

Framework-agnostic CSS properties. Mirrors React.CSSProperties but without React dependency.

interface CSSProperties {
  [key: string]: string | number | undefined
}

KitEvent

The event a web UI kit hands a component's handler: the members shared by the web kits. React's kit passes React's event (so stopPropagation() stops React parent handlers), the other web kits pass the DOM event; both satisfy this type. A handler that needs a member only one of them has (nativeEvent, composedPath(), isComposing) takes the component's ref element (see {@link BaseProps}) and listens on it.

type is left out on purpose: kits report different event types for the same moment (a text field's onChange is React's 'change' and the DOM's 'input').

interface KitEvent {
  /** The element the event started on. */
  readonly target: EventTarget | null
  /** The element of the component the handler was passed to. */
  readonly currentTarget: EventTarget | null
  /** Whether a handler already called {@link KitEvent.preventDefault}. */
  readonly defaultPrevented: boolean
  /** Cancels the browser's default action (a form's submit, a checkbox's toggle). */
  preventDefault(): void
  /** Stops handlers of ancestor components of the same kit. */
  stopPropagation(): void
}

KitModifierKeys

The modifier keys held during a mouse or keyboard event.

interface KitModifierKeys {
  /** Alt (Option) was held. */
  readonly altKey: boolean
  /** Control was held. */
  readonly ctrlKey: boolean
  /** Meta (Command, Windows) was held. */
  readonly metaKey: boolean
  /** Shift was held. */
  readonly shiftKey: boolean
}

KitMouseEvent

A mouse event as every kit hands it to a handler.

interface KitMouseEvent extends KitEvent, KitModifierKeys {
  /** The button that changed state (0 main, 1 auxiliary, 2 secondary). */
  readonly button: number
  /** The buttons held, as a bit mask. */
  readonly buttons: number
  /** The pointer's x position in the viewport. */
  readonly clientX: number
  /** The pointer's y position in the viewport. */
  readonly clientY: number
  /** The pointer's x position in the document. */
  readonly pageX: number
  /** The pointer's y position in the document. */
  readonly pageY: number
  /** The click count of a click event. */
  readonly detail: number
  /** The element the pointer came from or went to, for enter and leave events. */
  readonly relatedTarget: EventTarget | null
}

KitKeyboardEvent

A keyboard event as every kit hands it to a handler.

interface KitKeyboardEvent extends KitEvent, KitModifierKeys {
  /** The key's value (`'Enter'`, `'a'`). */
  readonly key: string
  /** The physical key (`'KeyA'`). */
  readonly code: string
  /** Whether the key is held down and auto-repeating. */
  readonly repeat: boolean
}

KitFocusEvent

A focus event as every kit hands it to a handler.

interface KitFocusEvent extends KitEvent {
  /** The element losing focus (on focus) or gaining it (on blur). */
  readonly relatedTarget: EventTarget | null
}

BaseProps

Base props shared by all components.

Ref element: a component that renders one main element gives the caller that element, the one that takes className and style. Each UI kit hands it over in its framework's own way: React and Solid a ref, Vue a template ref's $el, Svelte bind:ref, Angular the component's element() signal. It is empty while the element is not rendered (a closed Tooltip, Dropdown or Modal). A component's own doc names the element when it is not the outermost one.

interface BaseProps {
  /**
   * Additional CSS class name(s).
   */
  className?: string

  /**
   * Inline styles.
   */
  style?: CSSProperties

  /**
   * Test ID for automated testing.
   */
  testId?: string

  /**
   * Automation ID for AI agents and E2E tests. Maps to the `data-mol-id`
   * HTML attribute. Use `molId()` from `./automation.js` to generate
   * semantic IDs. (Tooling only — screen readers do not expose `data-*`
   * attributes; accessible names come from labels/`aria-*`.)
   */
  automationId?: string

  /**
   * Disables the controls the component renders: a disabled Button, Input, Textarea, Select,
   * Checkbox, Switch, RadioGroup, Tabs, Accordion or Pagination takes no input, a disabled
   * Dropdown never opens, and a disabled Card never calls `onClick` (an interactive one is
   * announced as disabled and leaves the tab order). A component that renders no control
   * (Badge, Spinner, Skeleton, a layout box) ignores it.
   */
  disabled?: boolean
}

HTMLElementProps

Base props for HTML elements. Framework bindings should extend this with framework-specific attributes.

interface HTMLElementProps extends BaseProps, Pick<ElementProps, 'lang'> {
  id?: string
  title?: string
  tabIndex?: number
  role?: ElementRole
  'aria-label'?: string
  'aria-labelledby'?: string
  'aria-describedby'?: string
  'aria-hidden'?: boolean
  'aria-disabled'?: boolean
  'aria-expanded'?: boolean
  'aria-selected'?: boolean
  'aria-checked'?: boolean | 'mixed'
  'aria-pressed'?: boolean | 'mixed'
  'aria-invalid'?: boolean
  'aria-required'?: boolean
  'aria-readonly'?: boolean
  'aria-busy'?: boolean
  'aria-live'?: 'off' | 'polite' | 'assertive'
  onClick?: MouseEventHandler
  onDoubleClick?: MouseEventHandler
  onMouseEnter?: MouseEventHandler
  onMouseLeave?: MouseEventHandler
  onFocus?: FocusEventHandler
  onBlur?: FocusEventHandler
  onKeyDown?: KeyboardEventHandler
  onKeyUp?: KeyboardEventHandler
  onKeyPress?: KeyboardEventHandler
}

InputElementProps

Base props for input elements.

interface InputElementProps extends HTMLElementProps {
  name?: string
  value?: string | number | readonly string[]
  defaultValue?: string | number | readonly string[]
  placeholder?: string
  required?: boolean
  readOnly?: boolean
  autoFocus?: boolean
  autoComplete?: string
  maxLength?: number
  minLength?: number
  pattern?: string
  /** Web change event. Prefer the control's value callback for shared web and native code. */
  onChange?: ChangeEventHandler
  onInput?: FormEventHandler
}

ButtonElementProps

Base props for button elements.

interface ButtonElementProps extends HTMLElementProps {
  /**
   * Defaults to `'button'` in every framework binding, so a button never submits a
   * form by accident. A form's primary action must set `type="submit"`: Enter then
   * submits the form, and tests that select `button[type="submit"]` find it.
   */
  type?: 'button' | 'submit' | 'reset'
  name?: string
  value?: string
  form?: string
}

TextareaElementProps

Base props for textarea elements.

interface TextareaElementProps extends HTMLElementProps {
  name?: string
  value?: string
  defaultValue?: string
  placeholder?: string
  required?: boolean
  readOnly?: boolean
  autoFocus?: boolean
  rows?: number
  cols?: number
  maxLength?: number
  minLength?: number
  wrap?: 'hard' | 'soft' | 'off'
  /** Web change event. {@link TextareaProps.onValueChange} also works on native. */
  onChange?: EventHandler<KitFieldChangeEvent>
  onInput?: FormEventHandler
}

SelectElementProps

Base props for select elements.

interface SelectElementProps extends HTMLElementProps {
  name?: string
  required?: boolean
  autoFocus?: boolean
  multiple?: boolean
  /** Web change event. {@link SelectProps.onValueChange} also works on native. */
  onChange?: EventHandler<KitFieldChangeEvent>
}

FormElementProps

Base props for form elements.

interface FormElementProps extends HTMLElementProps {
  action?: string
  method?: 'get' | 'post'
  encType?: string
  target?: string
  noValidate?: boolean
  autoComplete?: 'on' | 'off'
  onSubmit?: FormEventHandler
  onReset?: FormEventHandler
}

SelectOption

A single option in a Select dropdown.

interface SelectOption<T = string> {
  /**
   * Option value.
   */
  value: T

  /**
   * Display label.
   */
  label: string

  /**
   * Whether the option is disabled.
   */
  disabled?: boolean

  /**
   * Option group (for grouped selects).
   */
  group?: string
}

RadioOption

A single option in a RadioGroup.

interface RadioOption<T = string> {
  /**
   * Option value.
   */
  value: T

  /**
   * Display label.
   */
  label: Children

  /**
   * Whether the option is disabled.
   */
  disabled?: boolean
}

AccordionItem

A single item in an Accordion component.

interface AccordionItem<T = string> {
  /**
   * Item value/id.
   */
  value: T

  /**
   * Item header/trigger.
   */
  header: Children

  /**
   * Item content.
   */
  content: Children

  /**
   * Whether the item is disabled.
   */
  disabled?: boolean
}

TableColumn

Table column definition.

interface TableColumn<T> {
  /**
   * Column key (data property).
   */
  key: keyof T | string

  /**
   * Column header.
   */
  header: Children

  /**
   * Custom cell renderer.
   */
  render?: (value: unknown, row: T, index: number) => Children

  /**
   * Column width.
   */
  width?: string | number

  /**
   * Whether the column is sortable.
   */
  sortable?: boolean

  /**
   * Text alignment.
   */
  align?: 'left' | 'center' | 'right'
}

AccordionClassOptions

Options for generating accordion classes.

interface AccordionClassOptions {
  className?: string
}

AlertClassOptions

Options for generating alert classes.

interface AlertClassOptions {
  status?: ColorVariant
  className?: string
}

AvatarClassOptions

Options for generating avatar classes.

interface AvatarClassOptions {
  size?: Size | number
  rounded?: boolean
  className?: string
}

BadgeClassOptions

Options for generating badge classes.

interface BadgeClassOptions {
  color?: ColorVariant
  variant?: 'solid' | 'outline' | 'subtle'
  size?: Size
  rounded?: boolean
  className?: string
}

ButtonClassOptions

Options for generating button classes.

interface ButtonClassOptions {
  variant?: ButtonVariant
  color?: ColorVariant
  size?: Size
  fullWidth?: boolean
  loading?: boolean
  disabled?: boolean
  className?: string
}

CardClassOptions

Options for generating card classes.

interface CardClassOptions {
  variant?: 'elevated' | 'outlined' | 'filled'
  padding?: Size | 'none'
  interactive?: boolean
  className?: string
}

CheckboxClassOptions

Options for generating checkbox classes.

interface CheckboxClassOptions {
  error?: string
  className?: string
}

ContainerClassOptions

Options for generating container classes.

interface ContainerClassOptions {
  maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | string
  centered?: boolean
  className?: string
}

DropdownPosition

Absolute top/left pixel position for a dropdown element.

interface DropdownPosition {
  top: number
  left: number
}

DropdownContentClassOptions

Options for generating dropdown content classes.

interface DropdownContentClassOptions {
  className?: string
}

FlexClassOptions

Options for generating flex classes.

interface FlexClassOptions {
  direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse'
  justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'
  align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'
  wrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
  gap?: Size | string | number
  className?: string
}

ReactFormProps

Props for the Svelte form, including a failure managed by an external form controller.

The Svelte counterpart of @molecule/app-ui-react's ReactFormProps, with the same React members adapted to Svelte's rendering (children is a snippet).

interface ReactFormProps extends FormProps {
  /** A rejected submission, for example useForm().formState.submitError. */
  submitError?: unknown
}

FormFieldClassOptions

Options for generating form field classes.

interface FormFieldClassOptions {
  className?: string
}

GridClassOptions

Options for generating grid classes.

interface GridClassOptions {
  columns?: number | string
  rows?: number | string
  gap?: Size | string | number
  columnGap?: Size | string | number
  rowGap?: Size | string | number
  className?: string
}

InputClassOptions

Options for generating input classes.

interface InputClassOptions {
  size?: Size
  error?: string
  hasLeftElement?: boolean
  hasRightElement?: boolean
  clearable?: boolean
  hasValue?: boolean
  required?: boolean
  className?: string
}

ModalClassOptions

Options for generating modal content classes.

interface ModalClassOptions {
  size?: ModalSize
  className?: string
}

PaginationClassOptions

Options for generating pagination classes.

interface PaginationClassOptions {
  className?: string
}

ProgressClassOptions

Options for generating progress classes.

interface ProgressClassOptions {
  size?: Size
  color?: ColorVariant
  indeterminate?: boolean
  className?: string
}

RadioClassOptions

Options for generating radio classes.

interface RadioClassOptions {
  error?: string
  className?: string
}

SelectClassOptions

Options for generating select classes.

interface SelectClassOptions {
  size?: Size
  error?: string
  required?: boolean
  className?: string
}

SeparatorClassOptions

Options for generating separator classes.

interface SeparatorClassOptions {
  orientation?: 'horizontal' | 'vertical'
  className?: string
}

SkeletonClassOptions

Options for generating skeleton classes.

interface SkeletonClassOptions {
  circle?: boolean
  animation?: 'pulse' | 'wave' | 'none'
  className?: string
}

SpacerClassOptions

Options for generating spacer classes.

interface SpacerClassOptions {
  size?: Size | string | number
  horizontal?: boolean
  className?: string
}

SpinnerClassOptions

Options for generating spinner classes.

interface SpinnerClassOptions {
  size?: Size
  color?: ColorVariant | string
  className?: string
}

SwitchClassOptions

Options for generating switch classes.

interface SwitchClassOptions {
  size?: Size
  checked?: boolean
  disabled?: boolean
  className?: string
}

TableClassOptions

Options for generating table classes.

interface TableClassOptions {
  bordered?: boolean
  className?: string
}

TabsListClassOptions

Options for generating tabs list classes.

interface TabsListClassOptions {
  fitted?: boolean
  className?: string
}

TextareaClassOptions

Options for generating textarea classes.

interface TextareaClassOptions {
  error?: string
  required?: boolean
  className?: string
}

ToastData

Toast data interface for programmatic toast management.

interface ToastData {
  id: string
  title?: string
  description?: string
  status?: ColorVariant
  duration?: number
  dismissible?: boolean
}

ToastClassOptions

Options for generating toast classes.

interface ToastClassOptions {
  status?: ColorVariant
  className?: string
}

TooltipPosition

Absolute top/left pixel position for a tooltip element.

interface TooltipPosition {
  top: number
  left: number
}

TooltipClassOptions

Options for generating tooltip classes.

interface TooltipClassOptions {
  className?: string
}

PanelCloseContext

Carries the close callback for the drawer a panel is mounted in.

interface PanelCloseContext {
  /** Callback that dismisses the enclosing drawer/modal. */
  close: () => void
}

ToastContextValue

What {@link useToast} returns: the current toasts and how to change them.

interface ToastContextValue {
  /** The currently shown toasts. */
  toasts: ManagedToast[]
  /** Adds a toast and returns its id. */
  addToast: (toast: NewToast) => string
  /** Removes a toast by id. */
  removeToast: (id: string) => void
}

AccordionEntry

One accordion entry.

interface AccordionEntry {
  /** Item value (expansion key). */
  value: string
  /** Trigger label. */
  header?: Snippet | string
  /** Panel content. */
  content?: Snippet | string
  /** Disables the item's trigger. */
  disabled?: boolean
  /** Any extra fields. */
  [key: string]: unknown
}

AccordionProps

Props for {@link Accordion}.

interface AccordionProps extends WithElementRef<object, HTMLDivElement> {
  /** The accordion entries. */
  items: AccordionEntry[]
  /** Controlled expanded value(s). */
  value?: string | string[]
  /** Initially expanded value(s). */
  defaultValue?: string | string[]
  /** Called with the new expanded value(s). */
  onChange?: (value: string | string[]) => void
  /** Whether several items can be expanded at once. */
  multiple?: boolean
  /** Whether the last expanded item can collapse. */
  collapsible?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Disables the whole component (every control it renders). */
  disabled?: boolean
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra props. */
  [key: string]: unknown
}

AlertProps

Props for {@link Alert}.

interface AlertProps extends WithElementRef<object, HTMLDivElement> {
  /** Alert content. */
  children?: Snippet
  /** Alert title. */
  title?: string
  /** Status color. */
  status?: 'info' | 'success' | 'warning' | 'error' | 'primary' | 'secondary'
  /** Legacy variant prop; left-accent renders a leading bar. */
  variant?: string
  /** Assertive (role alert) or polite (role status) announcement. */
  live?: boolean
  /** Whether the dismiss button renders. */
  dismissible?: boolean
  /** Called when the dismiss button is clicked. */
  onDismiss?: () => void
  /** Custom leading icon. */
  icon?: Snippet
  /** Accessible label of the dismiss button. */
  dismissLabel?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

AuthGuardProps

Props for {@link AuthGuard}.

interface AuthGuardProps {
  /** Element rendered while the auth status is loading. */
  loadingFallback?: Snippet | string
  /** i18n key for the default loading-tag text. */
  loadingKey?: string
  /** Fallback text if the i18n key is missing. */
  loadingDefault?: string
  /** Path to redirect to when unauthenticated. */
  loginPath?: string
  /** Callback invoked when isAuthenticated transitions to true. */
  onAuthenticated?: () => void
  /** Children to render when authenticated. */
  children?: Snippet
  /** Any extra props. */
  [key: string]: unknown
}

AvatarProps

Props for {@link Avatar}.

interface AvatarProps extends WithElementRef<object, HTMLDivElement> {
  /** Image source; the fallback shows when absent or failed. */
  src?: string
  /** Image alt text. */
  alt?: string
  /** Name used for initials fallback. */
  name?: string
  /** Avatar size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number
  /** Whether the avatar is fully rounded. */
  rounded?: boolean
  /** Custom fallback content. */
  fallback?: Snippet
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

BadgeProps

Props for {@link Badge}.

interface BadgeProps extends WithElementRef<object, HTMLSpanElement> {
  /** Badge content. */
  children?: Snippet
  /** Color variant. */
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'
  /** Legacy variant prop (ignored). */
  variant?: string
  /** Badge size. */
  size?: 'sm' | 'md' | 'lg'
  /** Whether the badge is fully rounded. */
  rounded?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

ButtonProps

Props for {@link Button}.

interface ButtonProps extends WithElementRef<object, HTMLButtonElement> {
  /** Button content. */
  children?: Snippet
  /** Visual variant. */
  variant?: 'solid' | 'outline' | 'ghost' | 'link'
  /** Color variant. */
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'
  /** Control size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  /** Disables the button and marks it busy while true. */
  loading?: boolean
  /** Text shown instead of children while loading. */
  loadingText?: string
  /** Stretches the button to the full width. */
  fullWidth?: boolean
  /** Icon before the label. */
  leftIcon?: Snippet
  /** Icon after the label. */
  rightIcon?: Snippet
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Disables the button. */
  disabled?: boolean
  /** Native button type. */
  type?: 'button' | 'submit' | 'reset'
  /** Click handler. */
  onClick?: (event: MouseEvent) => void
  /** Any extra attributes forwarded to the button. */
  [key: string]: unknown
}

CardProps

Props for {@link Card}.

interface CardProps extends WithElementRef<object, HTMLDivElement> {
  /** Card content. */
  children?: Snippet
  /** Card variant. */
  variant?: string
  /** Whether the card is an interactive button target. */
  interactive?: boolean
  /** Padding size. */
  padding?: Size | 'none'
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Disables the whole component (every control it renders). */
  disabled?: boolean
  /** Click handler. */
  onClick?: (event: MouseEvent) => void
  /** Key handler; runs before an interactive card's Enter/Space activation, which its preventDefault() cancels. */
  onKeyDown?: KeyboardEventHandler
  /** Any other attribute or React DOM event handler (id, title, aria-*, data-*, onFocus, …), forwarded to the card. */
  [key: string]: unknown
}

CardSectionProps

Props for a card section ({@link CardHeader}, {@link CardTitle}, {@link CardDescription}, {@link CardContent}, or {@link CardFooter}).

interface CardSectionProps<E extends HTMLElement = HTMLElement> extends WithElementRef<
  Pick<ElementProps, 'lang'>,
  E
> {
  /** Content. */
  children?: Snippet
  /** Tooltip text. */
  title?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** Any extra attributes forwarded to the section element. */
  [key: string]: unknown
}

CardContentProps

Props for {@link CardContent}.

interface CardContentProps extends WithElementRef<object, HTMLDivElement> {
  /** Content. */
  children?: Snippet
  /** Extra class names. */
  className?: string
  style?: CSSStyle
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

CardDescriptionProps

Props for {@link CardDescription}.

interface CardDescriptionProps extends WithElementRef<
  Pick<ElementProps, 'lang'>,
  HTMLParagraphElement
> {
  /** Description content. */
  children?: Snippet
  /** Extra class names. */
  className?: string
  style?: CSSStyle
  /** Any extra attributes forwarded to the paragraph. */
  [key: string]: unknown
}

CardFooterProps

Props for {@link CardFooter}.

interface CardFooterProps extends WithElementRef<object, HTMLDivElement> {
  /** Footer content. */
  children?: Snippet
  /** Extra class names. */
  className?: string
  style?: CSSStyle
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

CardHeaderProps

Props for {@link CardHeader}.

interface CardHeaderProps extends WithElementRef<object, HTMLDivElement> {
  /** Header content. */
  children?: Snippet
  /** Extra class names. */
  className?: string
  style?: CSSStyle
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

CardTitleProps

Props for {@link CardTitle}.

interface CardTitleProps extends WithElementRef<object, HTMLHeadingElement> {
  /** Title content. */
  children?: Snippet
  /** Extra class names. */
  className?: string
  style?: CSSStyle
  /** Any extra attributes forwarded to the heading. */
  [key: string]: unknown
}

CheckboxProps

Props for {@link Checkbox}. The ref element is the native checkbox input, not its label wrapper.

interface CheckboxProps
  extends WithElementRef<object, HTMLInputElement>, Pick<KitCheckboxProps, 'onCheckedChange'> {
  /** Label content. */
  label?: string | Snippet
  /** Controlled checked state. */
  checked?: boolean
  /** Initial checked state for uncontrolled usage. */
  defaultChecked?: boolean
  /** Whether the indeterminate flag is set on the input. */
  indeterminate?: boolean
  /** Legacy size prop (ignored). */
  size?: string
  /** Error message. */
  error?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Disables the checkbox. */
  disabled?: boolean
  /** Form field name. */
  name?: string
  /** Explicit id. */
  id?: string
  /** Change handler (fires on the click-driven change, like React onChange). */
  onChange?: (event: MouseEvent & { currentTarget: HTMLInputElement }) => void
  /** Any extra attributes forwarded to the input. */
  [key: string]: unknown
}

ConfirmButtonProps

Props for {@link ConfirmButton}.

interface ConfirmButtonProps extends WithElementRef<object, HTMLButtonElement> {
  /** Fired ONLY on the confirming (second) click. */
  onConfirm: () => void | Promise<void>
  /** Visible label in the idle state. */
  label?: Snippet | string
  /** Visible label in the armed state. */
  confirmLabel?: Snippet | string
  /** Visible label while onConfirm is pending. */
  pendingLabel?: Snippet | string
  /** Seconds before the armed state auto-disarms; 0 disables. */
  disarmSeconds?: number
  /** Disable the control entirely. */
  disabled?: boolean
  /** data-testid. */
  testId?: string
  /** Extra class names. */
  className?: string
  /** Button color. */
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'
  /** Control size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  /** Visual variant. */
  variant?: 'solid' | 'outline' | 'ghost' | 'link'
  /** Inline styles. */
  style?: CSSStyle
  /** Any extra button attributes. */
  [key: string]: unknown
}

ConfirmDialogProps

Props for {@link ConfirmDialog}.

interface ConfirmDialogProps {
  /** Whether the dialog is open. */
  open: boolean
  /** Called when the dialog should close (escape, backdrop, cancel). */
  onClose: () => void
  /** Title. */
  title?: Snippet | string
  /** Body / warning text. */
  description?: Snippet | string
  /** Confirm-button label (e.g. "Delete"). */
  confirmLabel?: Snippet | string
  /** Cancel-button label. */
  cancelLabel?: Snippet | string
  /** Called when the user confirms. */
  onConfirm: () => void | Promise<void>
  /** Is the confirm action destructive? Defaults to true. */
  destructive?: boolean
  /** Extra body content between description and footer. */
  children?: Snippet
  /** Disables both buttons while the confirm action is pending. */
  loading?: boolean
  /** Any extra props. */
  [key: string]: unknown
}

ContainerProps

Props for {@link Container}.

interface ContainerProps extends WithElementRef<object, HTMLDivElement> {
  /** Content. */
  children?: Snippet
  /** Max width preset or custom CSS length. */
  maxWidth?: Size | '2xl' | 'full' | string
  /** Whether the container centers. */
  centered?: boolean
  /** Legacy horizontal padding prop (ignored). */
  paddingX?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

DropdownItem

One dropdown menu entry.

interface DropdownItem {
  value: string
  label?: Snippet | string
  icon?: Snippet | string
  shortcut?: string
  separator?: boolean
  disabled?: boolean
  [key: string]: unknown
}

DropdownTriggerProps

Menu-button props a {@link Dropdown} passes to its trigger snippet.

The object holds one key — an attachment created with Svelte's createAttachmentKey(). Spreading it on the snippet's own element makes that element the menu button, the way React's cloneElement path clones a single-element trigger: the attachment adds aria-haspopup, the live aria-expanded/aria-controls, a tabindex="0" when the element has none, data-testid/data-mol-id when given, disabled while the dropdown is disabled, and the click/keydown handlers, without a wrapper. A snippet that does not spread it (it renders text, several nodes, or ignores the argument) is wrapped in the role="button" fallback instead.

interface DropdownTriggerProps {
  /** The attachment that turns the element it is spread on into the menu button. */
  [key: symbol]: Attachment<HTMLElement>
}

DropdownProps

Props for {@link Dropdown}. The ref element is the role="menu" menu, not the trigger (test id and automation id go to the trigger).

interface DropdownProps extends WithElementRef<object, HTMLDivElement> {
  /**
   * Trigger content: a string or a snippet. A snippet receives the
   * {@link DropdownTriggerProps} to spread on its element, which then becomes
   * the menu button itself; a string, or a snippet that does not spread them,
   * is wrapped in a `role="button"` container instead.
   */
  trigger?: Snippet<[DropdownTriggerProps]> | string
  /** Menu entries. */
  items: DropdownItem[]
  /** Called with the chosen item's value. */
  onSelect?: (value: string) => void
  /** Preferred menu placement relative to the trigger. */
  placement?:
    'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right'
  /** Controlled open state. */
  open?: boolean
  /** Called with every open-state change (including the mount announcement). */
  onOpenChange?: (open: boolean) => void
  /** Alignment within the placement axis. */
  align?: 'start' | 'center' | 'end'
  /** Menu width in pixels, `'trigger'` to match the trigger, or `'auto'`. */
  width?: number | 'trigger' | 'auto'
  /** Extra class names on the menu. */
  className?: string
  /** Inline styles on the menu. */
  style?: CSSStyle
  /** data-testid on the trigger (the menu gets `<testId>-menu`). */
  testId?: string
  /** Disables the whole component (every control it renders). */
  disabled?: boolean
  /** Automation id on the trigger; the menu gets `<automationId>-menu`. */
  automationId?: string
  /** Any extra props. */
  [key: string]: unknown
}

DropdownLabelProps

Props for {@link DropdownLabel}.

interface DropdownLabelProps extends WithElementRef<Pick<ElementProps, 'lang'>, HTMLDivElement> {
  /** Label content. */
  children?: Snippet | string
  /** Extra class names. */
  className?: string
  /** Any extra props. */
  [key: string]: unknown
}

DropdownSeparatorProps

Props for {@link DropdownSeparator}.

interface DropdownSeparatorProps extends WithElementRef<object, HTMLDivElement> {
  /** Extra class names. */
  className?: string
  /** Any extra props. */
  [key: string]: unknown
}

EmptyStateProps

Props for {@link EmptyState}.

interface EmptyStateProps extends WithElementRef<object, HTMLDivElement> {
  /** Leading icon. */
  icon?: Snippet
  /** Title. */
  title?: string
  /** Description. */
  description?: string
  /** Action area. */
  action?: Snippet
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** data-mol-id. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

FlexProps

Props for {@link Flex}.

interface FlexProps extends WithElementRef<object, HTMLDivElement> {
  /** Content. */
  children?: Snippet
  /** Flex direction. */
  direction?: KitFlexProps['direction']
  /** Main-axis alignment. */
  justify?: KitFlexProps['justify']
  /** Cross-axis alignment. */
  align?: KitFlexProps['align']
  /** Wrapping. */
  wrap?: KitFlexProps['wrap']
  /** Gap token or raw value. */
  gap?: number | string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Click handler. */
  onClick?: (event: MouseEvent) => void
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

FloatingInputProps

Props for {@link FloatingInput}.

interface FloatingInputProps extends WithElementRef<object, HTMLInputElement> {
  /** Placeholder; also rendered as the floating label. */
  placeholder?: string
  /** Extra class names. */
  className?: string
  /** Controlled value. */
  value?: string
  /** Change handler (fires on input events, like React onChange). */
  onChange?: (event: Event & { currentTarget: HTMLInputElement }) => void
  /** Receives the typed text on each input event. */
  onValueChange?: (value: string) => void
  /** Initial value for uncontrolled usage. */
  defaultValue?: string
  /** Explicit id. */
  id?: string
  /** Any extra attributes forwarded to the input. */
  [key: string]: unknown
}

FormProps

Props for {@link Form}.

interface FormProps extends WithElementRef<object, HTMLFormElement> {
  /** Form content. */
  children?: Snippet
  /** Async submit handler receiving the collected form data. */
  onFormSubmit?: (data: Record<string, unknown>) => void | Promise<void>
  /** Disables the fieldset while true. */
  submitting?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Native submit handler. */
  onSubmit?: (event: SubmitEvent & { currentTarget: HTMLFormElement }) => void | Promise<void>
  /** Native form action. */
  action?: string
  /** Native form method. */
  method?: 'get' | 'post'
  /** Native novalidate flag. */
  noValidate?: boolean
  /** Any extra attributes forwarded to the form. */
  [key: string]: unknown
}

FormFieldProps

Props for {@link FormField}.

interface FormFieldProps extends WithElementRef<object, HTMLDivElement> {
  /** The field control. */
  children?: Snippet
  /** Visible label. */
  label?: string
  /** Field name driving ids. */
  name?: string
  /** Error message. */
  error?: string
  /** Hint message. */
  hint?: string
  /** Whether the label shows the required marker. */
  required?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

GridProps

Props for {@link Grid}.

interface GridProps extends WithElementRef<object, HTMLDivElement> {
  /** Content. */
  children?: Snippet
  /** Column count or a raw grid-template-columns value. */
  columns?: number | string
  /** Raw grid-template-rows value. */
  rows?: string
  /** Gap token or raw value. */
  gap?: number | string
  /** Column gap. */
  columnGap?: number | string
  /** Row gap. */
  rowGap?: number | string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

IconProps

Props for {@link Icon}.

interface IconProps {
  /** Icon name from the bonded icon set. */
  name: IconName
  /** Width and height of the rendered SVG in pixels. Defaults to 20. */
  size?: number
  /** Class name forwarded to the root svg. */
  className?: string
  /** Any extra HTML/SVG attributes forwarded to the root svg. */
  [key: string]: unknown
}

IconGlyphProps

Props for {@link IconGlyph}.

interface IconGlyphProps {
  /** Icon name from the bonded icon set. */
  name: IconName
  /** Class name forwarded to the root svg. */
  className?: string
}

InputProps

Props for {@link Input}. The ref element is the native input, not its label wrapper.

interface InputProps
  extends WithElementRef<object, HTMLInputElement>, Pick<KitInputProps, 'onValueChange'> {
  /** Input type. */
  type?: string
  /** Control size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  /** Text alignment. */
  align?: 'left' | 'center'
  /** Visible label. */
  label?: string
  /** Error message. */
  error?: string
  /** Hint message. */
  hint?: string
  /** Element before the input. */
  leftElement?: Snippet
  /** Element after the input. */
  rightElement?: Snippet
  /** Whether a clear button renders when a value exists. */
  clearable?: boolean
  /** Called when the clear button is clicked. */
  onClear?: (event: MouseEvent) => void
  /** Accessible label of the clear button. */
  clearLabel?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Disables the input. */
  disabled?: boolean
  /** Marks the input required. */
  required?: boolean
  /** Controlled value. */
  value?: string
  /** Initial value for uncontrolled usage. */
  defaultValue?: string
  /** Placeholder. */
  placeholder?: string
  /** Form field name. */
  name?: string
  /** Explicit id. */
  id?: string
  /** Change handler (fires on input events, like React onChange). */
  onChange?: (event: Event & KitFieldChangeEvent) => void
  /** Focus handler. */
  onFocus?: (event: FocusEvent) => void
  /** Blur handler. */
  onBlur?: (event: FocusEvent) => void
  /** Focuses the input once on mount. */
  autoFocus?: boolean
  /** Any extra attributes forwarded to the input. */
  [key: string]: unknown
}

LabelProps

Props for {@link Label}.

interface LabelProps extends WithElementRef<Pick<ElementProps, 'lang'>, HTMLLabelElement> {
  /** Label content. */
  children?: Snippet
  /** Whether the required marker renders. */
  required?: boolean
  /** Extra class names. */
  className?: string
  /** Any extra attributes forwarded to the label. */
  [key: string]: unknown
}

LanguagePickerProps

Props for {@link LanguagePicker}.

interface LanguagePickerProps {
  /** i18n key for the trigger button label / aria-label. */
  labelKey?: string
  /** Fallback label if the i18n key is missing. */
  labelDefault?: string
  /** i18n key for the modal title. */
  modalTitleKey?: string
  /** Fallback modal title if the i18n key is missing. */
  modalTitleDefault?: string
  /** Icon glyph to render before the current locale name. */
  icon?: IconName
  /** Pixel size for the rendered icon. */
  iconSize?: number
  /** What to render inside the trigger button. */
  display?: 'name' | 'code' | 'icon'
  /** Optional className appended to the trigger button. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid for the trigger button. */
  testId?: string
  /** Optional render override: receives `{ open }` and replaces the default trigger. */
  renderTrigger?: Snippet<[() => void]>
  /** Any extra button attributes forwarded to the trigger. */
  [key: string]: unknown
}

LoadErrorBannerProps

Props for {@link LoadErrorBanner}.

interface LoadErrorBannerProps {
  /** The primary error line. */
  message?: Snippet | string
  /** Secondary line under the message (status code, hint). */
  detail?: Snippet | string
  /** Called when Retry is clicked; while pending the button is disabled. */
  onRetry?: () => void | Promise<void>
  /** Retry-button label. */
  retryLabel?: Snippet | string
  /** data-mol-id for the retry button. */
  retryMolId?: string
  /** Extra content between message and retry row. */
  children?: Snippet
  /** Extra class names on the root. */
  className?: string
  /** Inline styles on the root. */
  style?: CSSStyle
  /** data-testid for the root. */
  testId?: string
  /** Any extra props forwarded to the root div. */
  [key: string]: unknown
}

ModalProps

Props for {@link Modal}. The ref element is the dialog, and null while the modal is closed.

interface ModalProps extends WithElementRef<object, HTMLDivElement> {
  /** Whether the dialog is open. */
  open: boolean
  /** Called when the dialog should close (escape, overlay, close button). */
  onClose: () => void
  /** Title; also names the dialog via aria-labelledby. */
  title?: Snippet | string
  /** Dialog body. */
  children?: Snippet
  /** Dialog size. */
  size?: 'sm' | 'md' | 'lg' | 'xl' | 'full'
  /** Whether the fixed close button is rendered. */
  showCloseButton?: boolean
  /** Whether an overlay click closes the dialog. */
  closeOnOverlayClick?: boolean
  /** Whether Escape closes the dialog. */
  closeOnEscape?: boolean
  /** Footer content. */
  footer?: Snippet | string
  /** Whether the dialog is vertically centered. */
  centered?: boolean
  /** aria-label for the close button. */
  closeLabel?: string
  /** Whether opening locks body scroll. */
  preventScroll?: boolean
  /** The control that takes focus when the dialog opens; the first focusable control without it. */
  initialFocus?: OverlayTarget
  /** Extra class names on the dialog panel. */
  className?: string
  /** Inline styles on the dialog panel. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** data-* and aria-* attributes forwarded to the dialog panel. */
  [key: string]: unknown
}

OptimisticToggleButtonProps

Props for {@link OptimisticToggleButton}; labels come from the app's translations.

interface OptimisticToggleButtonProps extends WithElementRef<object, HTMLButtonElement> {
  /** The loaded server value. Mount the button only after its initial record exists. */
  value: boolean
  /** Saves the desired boolean and returns the server-confirmed boolean; reject on failure. */
  commit: (desired: boolean) => Promise<boolean>
  /** Label when the displayed value is true. */
  activeLabel: Snippet | string
  /** Label when the displayed value is false. */
  inactiveLabel: Snippet | string
  /** Receives a failed save after the controller has restored the last confirmed value. */
  onError?: (error: unknown) => void
  /** Any other ButtonProps passthrough. */
  [key: string]: unknown
}

PageHeaderProps

Props for {@link PageHeader}.

interface PageHeaderProps extends WithElementRef<object, HTMLDivElement> {
  /** Page title. */
  title?: string
  /** Description under the title. */
  description?: string
  /** Action buttons area. */
  actions?: Snippet
  /** Breadcrumb trail. */
  breadcrumbs?: { label: string; href?: string }[]
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** data-mol-id. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

PageShellProps

Props for {@link PageShell}.

interface PageShellProps extends WithElementRef<object, HTMLDivElement> {
  /** Main content. */
  children?: Snippet
  /** Sidebar content. */
  sidebar?: Snippet
  /** Top bar content. */
  topbar?: Snippet
  /** Whether the sidebar is collapsed. */
  sidebarCollapsed?: boolean
  /** Sidebar collapse toggle handler. */
  onSidebarToggle?: () => void
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** data-mol-id. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

PaginationLabels

Optional label overrides; goToPage receives the page number.

interface PaginationLabels {
  /** The nav's aria-label. */
  nav?: string
  /** First-page button label. */
  first?: string
  /** Previous-page button label. */
  previous?: string
  /** Next-page button label. */
  next?: string
  /** Last-page button label. */
  last?: string
  /** Page button label builder. */
  goToPage?: (page: number) => string
  /** Any extra fields. */
  [key: string]: unknown
}

PaginationProps

Props for {@link Pagination}.

interface PaginationProps extends WithElementRef<object, HTMLElement> {
  /** The currently active page number. */
  page: number
  /** The total number of pages. */
  totalPages: number
  /** Called with the newly selected page. */
  onChange: (page: number) => void
  /** Sibling pages shown around the current page. */
  siblings?: number
  /** Boundary pages always shown at start and end. */
  boundaries?: number
  /** Control size. */
  size?: 'sm' | 'md' | 'lg'
  /** Whether first/last buttons render. */
  showFirstLast?: boolean
  /** Whether previous/next buttons render. */
  showPrevNext?: boolean
  /** Label overrides. */
  labels?: PaginationLabels
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Disables every control. */
  disabled?: boolean
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra props. */
  [key: string]: unknown
}

PanelCloseProviderProps

Props for {@link PanelCloseProvider}.

interface PanelCloseProviderProps {
  /** Callback that dismisses the enclosing drawer/modal. */
  close: () => void
  /** Panel content that may call `usePanelClose`. */
  children?: Snippet
}

ProgressProps

Props for {@link Progress}.

interface ProgressProps extends WithElementRef<object, HTMLDivElement> {
  /** Progress value. */
  value: number
  /** Maximum value. */
  max?: number
  /** Progress size. */
  size?: 'sm' | 'md' | 'lg'
  /** Progress color. */
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'
  /** Whether to show the percentage label. */
  showValue?: boolean
  /** Accessible and visible label. */
  label?: string
  /** Whether the progress is indeterminate. */
  indeterminate?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

PromptDialogProps

Props for {@link PromptDialog}.

interface PromptDialogProps {
  /** Whether the dialog is open. */
  open: boolean
  /** Called when the dialog should close (escape, backdrop, cancel, or a fulfilled submit). */
  onClose: () => void
  /** Dialog heading. */
  title?: Snippet | string
  /** Explanatory line under the title. */
  description?: Snippet | string
  /** Input placeholder. */
  placeholder?: string
  /** Value the input starts from every time the dialog opens. */
  initialValue?: string
  /** Called with the entered value on confirm; resolve to close. */
  onSubmit: (value: string) => void | Promise<void>
  /** Confirm-button label. */
  confirmLabel?: Snippet | string
  /** Cancel-button label. */
  cancelLabel?: Snippet | string
  /** Render the confirm button in the error color. */
  destructive?: boolean
  /** data-mol-id for the text input. */
  inputMolId?: string
  /** data-mol-id for the confirm button. */
  confirmMolId?: string
  /** data-mol-id for the cancel button. */
  cancelMolId?: string
  /** Extra body content under the input. */
  children?: Snippet
  /** Any extra props. */
  [key: string]: unknown
}

RadioGroupProps

Props for {@link RadioGroup}.

interface RadioGroupProps extends WithElementRef<object, HTMLDivElement> {
  /** Radio options. */
  options: { value: string; label?: unknown; disabled?: boolean }[]
  /** Controlled selected value. */
  value?: string
  /** Selection handler. */
  onChange?: (value: string) => void
  /** Legacy size prop (ignored). */
  size?: string
  /** Group label. */
  label?: string
  /** Submitted field name; generated when omitted. */
  name?: string
  /** Layout direction. */
  direction?: 'vertical' | 'horizontal'
  /** Error message. */
  error?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Disables every option. */
  disabled?: boolean
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

ReactNodeProps

Props for {@link ReactNode}.

interface ReactNodeProps {
  node?: Snippet | string | number
}

ResponsiveAppShellProps

Props for {@link ResponsiveAppShell}.

interface ResponsiveAppShellProps {
  /**
   * The shell sub-components — `ResponsiveAppShellTopBar`,
   * `ResponsiveAppShellSidebar`, `ResponsiveAppShellDrawer` and
   * `ResponsiveAppShellContent`.
   */
  children?: Snippet
  /**
   * Sidebar (and drawer) width: `'sm'` (208px), `'md'` (240px, default),
   * `'lg'` (256px) or an exact pixel number.
   */
  sidebarWidth?: ShellSidebarWidth
  /** Extra classes on the root flex-row container. */
  className?: string
  /** `data-mol-id` for the root container. Defaults to `'shell-root'`. */
  dataMolId?: string
}

ResponsiveAppShellContentProps

Props for {@link ResponsiveAppShellContent}.

interface ResponsiveAppShellContentProps {
  /** The routed page content — typically the current route's outlet. */
  children?: Snippet
  /** Extra classes on the `<main>`. */
  className?: string
  /** Inline styles on the `<main>` (rarely needed — layout is owned). */
  style?: CSSStyle
  /** `data-mol-id` override. Default: `'shell-content'`. */
  dataMolId?: string
  /** `data-testid` override. */
  testId?: string
}

ResponsiveAppShellDrawerProps

Props for {@link ResponsiveAppShellDrawer}.

interface ResponsiveAppShellDrawerProps {
  /**
   * Nav content — the links, same as (or adapted from) the Sidebar's. Only
   * mounted while the drawer is open on a below-breakpoint viewport.
   */
  children?: Snippet
  /**
   * Header row content (typically the brand), rendered next to the close
   * button.
   */
  header?: Snippet | string
  /**
   * Accessible name for the dialog and its `<nav>` landmark. Defaults to the
   * `appShell.primaryNav` translation (English fallback `"Primary
   * navigation"`).
   */
  navLabel?: string
  /** Below-nav content (user card, sign-out), after the `<nav>`. */
  footer?: Snippet | string
  /** Whether the panel shows a close (X) button. Default: `true`. */
  showCloseButton?: boolean
  /** Extra classes on the dialog panel. */
  className?: string
  /** `data-mol-id` override for the panel. Default: `'shell-drawer'`. */
  dataMolId?: string
  /** `data-mol-id` override for the close button. Default: `'shell-drawer-close'`. */
  closeDataMolId?: string
  /** `data-testid` override for the panel. */
  testId?: string
}

ResponsiveAppShellSidebarProps

Props for {@link ResponsiveAppShellSidebar}.

interface ResponsiveAppShellSidebarProps {
  /**
   * Nav content — the links (they land inside the sidebar's `<nav>`
   * landmark; pass `aria-current="page"` from the active one yourself).
   */
  children?: Snippet
  /**
   * Accessible name for the sidebar's `<nav>` landmark. Defaults to the
   * `appShell.primaryNav` translation (English fallback `"Primary
   * navigation"`).
   */
  navLabel?: string
  /**
   * Below-nav content (user card, quick action) — rendered after the `<nav>`
   * in a bordered footer row, so it does not sit inside the nav landmark.
   */
  footer?: Snippet | string
  /** Extra classes on the `<aside>`. */
  className?: string
  /** `data-mol-id` override. Default: `'shell-sidebar'`. */
  dataMolId?: string
  /** `data-testid` override. */
  testId?: string
}

ResponsiveAppShellTopBarProps

Props for {@link ResponsiveAppShellTopBar}.

interface ResponsiveAppShellTopBarProps {
  /**
   * Brand/title node, rendered after the menu trigger — typically a link with
   * the app name or logo.
   */
  brand?: Snippet | string
  /** Trailing actions — user menu, theme toggle, search, etc. */
  actions?: Snippet | string
  /**
   * Render the top bar only below the breakpoint (mount-conditioned, not
   * CSS-hidden — no dead DOM on desktop). Default: `false`.
   */
  mobileOnly?: boolean
  /** Extra classes on the `<header>`. */
  className?: string
  /** `data-mol-id` override. Default: `'shell-topbar'`. */
  dataMolId?: string
  /** `data-testid` override. */
  testId?: string
}

SelectProps

Props for {@link Select}. The ref element is the native select, not its label wrapper.

interface SelectProps extends WithElementRef<object, HTMLSelectElement> {
  /** Select options, optionally grouped. */
  options: { value: string; label?: unknown; disabled?: boolean; group?: string }[]
  /** Controlled selected value. */
  value?: string
  /** Receives the selected value on change. */
  onValueChange?: (value: string) => void
  /** Control size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  /** Visible label. */
  label?: string
  /** Placeholder option. */
  placeholder?: string
  /** Error message. */
  error?: string
  /** Hint message. */
  hint?: string
  /** Whether a clear ("--") option renders. */
  clearable?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Disables the select. */
  disabled?: boolean
  /** Marks the select required. */
  required?: boolean
  /** Form field name. */
  name?: string
  /** Explicit id. */
  id?: string
  /** Change handler (native change event). */
  onChange?: (event: Event & KitFieldChangeEvent) => void
  /** Any extra attributes forwarded to the select. */
  [key: string]: unknown
}

SeparatorProps

Props for {@link Separator}.

interface SeparatorProps extends WithElementRef<object, HTMLDivElement> {
  /** Orientation of the separator. */
  orientation?: 'horizontal' | 'vertical'
  /** Decorative separators are purely visual. */
  decorative?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

SidebarUserCardProps

Props for {@link SidebarUserCard}.

interface SidebarUserCardProps {
  /** Panel content shown inside the drawer; dismisses via usePanelClose(). */
  children?: Snippet
  /** Display name override. */
  name?: string
  /** Secondary line under the name. */
  secondaryLine?: string
  /** Avatar image URL override. */
  avatarUrl?: string
  /** i18n key for the trigger button's aria-label. */
  ariaLabelKey?: string
  /** Fallback aria-label if the i18n key is missing. */
  ariaLabelDefault?: string
  /** data-mol-id for the trigger button. */
  dataMolId?: string
  /** Extra className composed onto the trigger button. */
  className?: string
  /** Inline styles on the trigger button. */
  style?: CSSStyle
  /** data-testid for the trigger button. */
  testId?: string
  /** Any extra button attributes forwarded to the trigger. */
  [key: string]: unknown
}

SkeletonProps

Props for {@link Skeleton}.

interface SkeletonProps extends WithElementRef<object, HTMLDivElement> {
  /** Width in pixels or a raw CSS value. */
  width?: number | string
  /** Height in pixels or a raw CSS value. */
  height?: number | string
  /** Whether the skeleton is a circle. */
  circle?: boolean
  /** Border radius override. */
  borderRadius?: number | string
  /** Animation style. */
  animation?: 'pulse' | 'wave' | 'none'
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra attributes. */
  [key: string]: unknown
}

SkeletonCircleProps

Props for {@link SkeletonCircle}.

interface SkeletonCircleProps extends WithElementRef<object, HTMLDivElement> {
  /** Pixel size. */
  size?: number
  /** Extra class names. */
  className?: string
}

SkeletonTextProps

Props for {@link SkeletonText}.

interface SkeletonTextProps extends WithElementRef<object, HTMLDivElement> {
  /** Number of lines. */
  lines?: number
  /** Extra class names. */
  className?: string
}

SpacerProps

Props for {@link Spacer}.

interface SpacerProps extends WithElementRef<object, HTMLDivElement> {
  /** Named size or raw value. */
  size?: number | string
  /** Whether the spacer is inline. */
  horizontal?: boolean
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** Any extra attributes forwarded to the div. */
  [key: string]: unknown
}

SpinnerProps

Props for {@link Spinner}.

interface SpinnerProps extends WithElementRef<object, HTMLDivElement> {
  /** Spinner size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  /** Named color variant or a raw CSS color. */
  color?: string
  /** Accessible label; also rendered visually for screen readers. */
  label?: string
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: Record<string, string | number | undefined>
  /** data-testid. */
  testId?: string
  /** Automation id, rendered as `data-mol-id`. */
  automationId?: string
  /** Any extra data-* or aria-* attributes forwarded to the div. */
  [key: string]: unknown
}

SwitchProps

Props for {@link Switch}. The ref element is the role="switch" button.

interface SwitchProps
  extends WithElementRef<object, HTMLButtonElement>, Pick<KitSwitchProps, 'onCheckedChange'> {
  /** Label content. */
  label?: string | Snippet
  /** Controlled checked state. */
  checked?: boolean
  /** Control size. */
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  /** Track color. */
  color?: ColorVariant
  /** Extra class names. */
  className?: string
  /** Inline styles. */
  style?: CSSStyle
  /** data-testid. */
  testId?: string
  /** The field name submitted while checked. */
  name?: KitSwitchProps['name']
  /** The field value submitted while checked. */
  value?: KitSwitchProps['value']
  /** Requires the switch to be checked when submitting. */
  required?: KitSwitchProps['required']
  /** Disables the switch. */
  disabled?: boolean
  /** Receives the native change event from the hidden checkbox. */
  onChange?: (event: Event & { currentTarget: HTMLInputElement }) => void
  /** Click handler; can veto the toggle with preventDefault(). */
  onClick?: (event: MouseEvent) => void
  /** Any extra attributes forwarded to the button. */
  [key: string]: unknown
}

TableColumnSpec

One table column.

interface TableColumnSpec {
  /** Row field this column reads. */
  key: string
  /** Header cell content. */
  header?: Snippet | string
  /** Cell renderer: a snippet or a plain function, called with (value, row, index). */
  render?:
    | Snippet<[unknown, Record<string, unknown>, number]>
    | ((value: unknown, row: Record<string, unknown>, index: number) => unknown)
  /** Cell text alignment. */
  align?: 'left' | 'center' | 'right'
  /** Whether the header sorts