# bref-ui
## button
An action or navigation control with text or icon labels, theme colors, five sizes, three variants, and wide, rounded or disabled options.
```svelte
```
```svelte
Content
```
Use as to choose a semantic div, section or span. Native attributes, events and children are forwarded. Choose orientation, spacing and dimensions for layout, then variant, color, glass, shadow and radius for appearance. Scroll regions need a constrained parent height and an accessible name. The surface helper provides typed props for reuse.
Props: as?: 'div' | 'section' | 'span' = div — Native root element.; children?: Snippet = Omitted — Content rendered directly inside the root.; color?: Color = background — Theme color; the shared recipe supplies content color.; variant?: Variant = neutral — Lightly tinted neutral, opaque tinted soft, or opaque filled panel.; spacing?: Size = Omitted — Shared padding and gap; omitted means zero.; orientation?: Orientation = vertical — Column, or row with centered cross-axis alignment.; width?: Dimension = fill — fill uses 100%; fit hugs content.; height?: Dimension = fit — fit uses natural height; fill uses 100% of a sized parent.; radius?: Size | `${number}rem` | `${number}%` = Omitted (0) — Named corner scale or an explicit rem/percentage radius.; shadow?: BaseSize | boolean = false — Shadow strength; true selects medium.; hover?: BaseSize = Omitted — Optional hover/focus treatment; does not make the root interactive.; scroll?: boolean = false — true sets overflow to auto; otherwise overflow stays visible.; glass?: boolean = false — Enable translucent paint and backdrop blur.
## theme
Set up semantic palettes, native styles, surfaces, glass and icon fonts at the app root.
```svelte
Theme
```
Render once at the app root. This component emits color-scheme metadata and has no visible control. Pass a reactive mode prop; auto allows the system preference, light and dark force a scheme. Build a labeled native control to update mode. The mode prop is not bindable.
Props: mode?: 'light' | 'dark' | 'auto' = auto — light, dark or auto; controls color-scheme metadata.
## checkbox
A compact checkbox with clear checked states and native form behavior.
```svelte
Accept terms
```
Wrap in a label or connect a label with for/id. Bind checked; pass indeterminate for a mixed state (not bindable). Native checkbox attributes, form submission, required, disabled and change/input events are preserved. Customize size; keep a visible keyboard focus indicator.
Props: size?: Size = medium — Checkbox size from x-small through x-large.; checked?: boolean = false (bindable) — Bind to the checked state. Checkmark motion respects reduced motion and does not delay removing a parent.
## switch
A checkbox-based on/off control with native form behavior.
```svelte
{#if enabled}{:else}{/if}
Notifications
```
Use a visible label for the native checkbox. Bind checked for state; name, required, disabled and native events retain form semantics. Children are an optional decorative snippet; keep the control accessible independently of its icon. Customize with scoped CSS and existing theme tokens.
Props: checked?: boolean = false (bindable) — Bindable on/off state.; size?: BaseSize = medium — small, medium or large.; children?: Snippet = Omitted — Decorative content rendered inside the thumb.
## progress
Show determinate or indeterminate progress, with an optional controlled seek control.
```svelte