# BIU UI — Full Documentation & API Reference
Index: https://ui.biu.dev/llms.txt
> Zero-Tailwind React 19 UI library built on Base UI 1.9 and 4-layer `@layer` CSS. All API references and usage examples below are public. Component TSX source is open source (MIT) for Free items and gated for BIU UI Pro items.
## Installation Summary
- Open Source (41 components + 2 starter blocks):
- npm: `pnpm add @biudev/ui @base-ui/react`
- shadcn Registry: `pnpm dlx shadcn add @biudev/` (registry URL: `https://ui.biu.dev/r/0.1.0/{name}.json`)
- CLI: `npx @biudev/cli add --registry https://ui.biu.dev/r/0.1.0`
- BIU UI Pro (11 advanced components + 11 workspace blocks):
- Interactive previews & API references are public; private `@biudev-pro/*` registry source requires a BIU UI Pro license.
## Design System Foundations
- **Overview** (https://ui.biu.dev/docs/design-system): Default design philosophy, 4-layer CSS architecture, and foundation index.
- **Colors** (https://ui.biu.dev/docs/design-system/colors): Surfaces, alpha ink hierarchy, achromatic actions, and 6 semantic status tones.
- **Typography** (https://ui.biu.dev/docs/design-system/typography): Heading (Nunito), UI Sans (Inter), and Monospace stacks, 7-step type ramp, and tabular numerals.
- **Spacing & density** (https://ui.biu.dev/docs/design-system/spacing): 4px base spacing scale (including 6px compact & 20px dialog steps), aligned 28/32/36px control heights, and touch targets.
- **Radius & geometry** (https://ui.biu.dev/docs/design-system/radius): 5-step corner ladder and the concentric nesting formula for containers.
- **Elevation & shadows** (https://ui.biu.dev/docs/design-system/shadows): 0.5px hairline rings paired with soft multi-layer shadows for Light and Dark.
- **Motion** (https://ui.biu.dev/docs/design-system/motion): Decision framework, live curve comparison, timing table, 5 interactive recipes, and reduced motion.
- **Focus & accessibility** (https://ui.biu.dev/docs/design-system/focus): Keyboard-only :focus-visible rings, roving tabindex, and dialog focus restoration.
- **Layers & theming** (https://ui.biu.dev/docs/design-system/layers): Z-index stacking tiers, React 19 style precedence, and custom theme composition.
---
## Chat Composer
- **URL**: https://ui.biu.dev/docs/components/chat-composer
- **Category**: AI Agents
- **Edition**: Open Source (MIT)
- **Summary**: Auto-growing AI prompt input with file attachments, drag-and-drop, model & approval pickers, voice dictation, and streaming stop controls.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/chat-composer`
- **Install (npm)**: `import { ChatComposer } from "@biudev/ui/chat-composer"`
- **Public Source**: https://ui.biu.dev/docs/source/chat-composer
### Usage
```tsx
import { ChatComposer } from "@/components/ui/biu/chat-composer";
export function Example() {
return (
console.log("send", payload)}
/>
);
}
```
### API Reference
#### ChatComposerStatus
Inherits: `'ready' & 'submitted' & 'streaming'`
`'ready' | 'submitted' | 'streaming'`
#### ChatComposerModel
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `name` (required) | `string` | `—` | Form field name or display name. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `badge` | `string` | `—` | Optional badge value or count displayed beside the label. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
#### ChatComposerApprovalMode
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `tone` | `'neutral' \| 'info' \| 'warning' \| 'danger'` | `—` | Semantic color tone (neutral, info, success, warning, danger, or purple). |
#### ChatComposerAttachment
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `name` (required) | `string` | `—` | Form field name or display name. |
| `size` | `number` | `—` | Size tier controlling height, padding, and typography. |
| `mimeType` | `string` | `—` | MIME type of the attached file. |
| `previewUrl` | `string` | `—` | Caller-owned preview URL. The composer generates its own temporary previews for image files without one. |
| `file` | `File` | `—` | Underlying browser File object when attached from disk. |
#### ChatComposerSuggestion
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `prompt` (required) | `string` | `—` | Submitted prompt text. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
#### ChatComposerCommand
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Command slug without the leading slash (e.g. `'review'`, `'fix'`). |
| `label` (required) | `string` | `—` | Human-readable command title shown in the slash menu. |
| `description` | `string` | `—` | Optional short explanation shown beside or beneath the label. |
| `icon` | `ReactNode` | `—` | Optional leading icon. |
| `shortcut` | `string` | `—` | Optional trailing keyboard hint or badge. |
#### ChatComposerAction
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Action identifier passed to `onAction`. |
| `label` (required) | `string` | `—` | Action label rendered inside the `+` menu. |
| `description` | `string` | `—` | Optional supporting description. |
| `icon` | `ReactNode` | `—` | Optional leading icon. |
#### ChatComposerSubmitPayload
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` (required) | `string` | `—` | Plain text content for the item or status. |
| `attachments` (required) | `ChatComposerAttachment[]` | `—` | Attached files included with the prompt. |
| `modelId` | `string` | `—` | Selected model identifier. |
| `approvalModeId` | `string` | `—` | Selected agent approval policy identifier. |
#### ChatComposerLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `placeholder` (required) | `string` | `—` | Placeholder text displayed when the input is empty. |
| `send` (required) | `string` | `—` | Accessible label for the send prompt button. |
| `stop` (required) | `string` | `—` | Accessible label for stopping an active generation. |
| `submitting` (required) | `string` | `—` | Indicates an asynchronous submission is in progress. |
| `attach` (required) | `string` | `—` | Accessible label for the attach-files button. |
| `removeAttachment` (required) | `(name: string) => string` | `—` | Accessible label for removing an attachment chip. |
| `selectModel` (required) | `string` | `—` | Accessible label for the model selector menu. |
| `selectApproval` (required) | `string` | `—` | Accessible label for the approval mode selector menu. |
| `voiceStart` (required) | `string` | `—` | Accessible label for starting voice dictation. |
| `voiceStop` (required) | `string` | `—` | Accessible label for stopping voice dictation. |
| `dropHint` (required) | `string` | `—` | Prompt shown when dragging files over the composer. |
| `voiceUnavailable` | `string` | `—` | Notice shown when browser speech recognition is unavailable. |
| `dictationSample` (required) | `string` | `—` | Fallback demo phrase inserted when voice API is unavailable. |
#### ChatComposerProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string` | `—` | Controlled text value. |
| `defaultValue` | `string` | `''` | Uncontrolled initial text value. |
| `onValueChange` | `(value: string) => void` | `—` | Fired whenever the prompt text changes. |
| `onSubmit` | `(payload: ChatComposerSubmitPayload) => void` | `—` | Fired when the user submits via Enter or the send button. |
| `onStop` | `() => void` | `—` | Fired when the user clicks Stop during `'streaming'` status. |
| `status` | `ChatComposerStatus` | `'ready'` | Current submission / streaming lifecycle state. Defaults to `'ready'`. |
| `placeholder` | `string` | `—` | Placeholder copy inside the auto-growing textarea. |
| `disabled` | `boolean` | `false` | Disables typing, attachments, and submission. |
| `autoFocus` | `boolean` | `false` | Auto-focus the textarea on mount. |
| `maxHeight` | `number` | `200` | Maximum textarea height in pixels before scrolling. Defaults to `200`. |
| `models` | `readonly ChatComposerModel[]` | `DEFAULT_CHAT_MODELS` | Available models shown in the bottom-left model picker. Pass `[]` to hide. |
| `model` | `string` | `—` | Controlled selected model id. |
| `defaultModel` | `string` | `—` | Uncontrolled initial model id. |
| `onModelChange` | `(modelId: string) => void` | `—` | Fired when the user selects a different model. |
| `approvalModes` | `readonly ChatComposerApprovalMode[]` | `—` | Optional human-in-the-loop approval modes (e.g. Always ask / Approve edits / Full access). |
| `approvalMode` | `string` | `—` | Controlled selected approval mode id. |
| `defaultApprovalMode` | `string` | `—` | Uncontrolled initial approval mode id. |
| `onApprovalModeChange` | `(modeId: string) => void` | `—` | Fired when the user switches approval mode. |
| `attachments` | `readonly ChatComposerAttachment[]` | `—` | Controlled attachment list. |
| `defaultAttachments` | `readonly ChatComposerAttachment[]` | `[]` | Uncontrolled initial attachments. |
| `onAttachmentsChange` | `(attachments: ChatComposerAttachment[]) => void` | `—` | Fired whenever attachments are added or removed. |
| `allowAttachments` | `boolean` | `true` | Enables file attach button, paste, and drag-and-drop. Defaults to `true`. |
| `accept` | `string` | `—` | Accepted MIME types / extensions for the file picker, paste, and drop. |
| `maxAttachments` | `number` | `8` | Maximum number of attached files. Defaults to `8`. |
| `voice` | `boolean` | `true` | Shows the voice dictation trigger with animated waveform feedback. Defaults to `true`. |
| `onVoiceChange` | `(listening: boolean) => void` | `—` | Optional custom handler when toggling voice input; if omitted, uses Web Speech API with graceful fallback. |
| `suggestions` | `readonly ChatComposerSuggestion[]` | `—` | Optional starter prompt chips displayed beneath the composer card. |
| `submitOnSuggestion` | `boolean` | `false` | If `true`, clicking a suggestion submits immediately instead of filling the textarea. Defaults to `false`. |
| `commands` | `readonly ChatComposerCommand[]` | `—` | Optional `/` slash commands surfaced in a floating menu when typing `/` in the prompt. |
| `onCommand` | `(command: ChatComposerCommand) => void` | `—` | Fired when the user selects a `/` slash command. |
| `actions` | `readonly ChatComposerAction[]` | `—` | Optional quick actions rendered in a `+` dropdown menu alongside file upload. |
| `onAction` | `(actionValue: string) => void` | `—` | Fired when the user picks an item from the `+` quick actions menu. |
| `header` | `ReactNode` | `—` | Optional banner or context slot rendered at the top of the composer card (e.g. reply quote or approval notice). |
| `leadingActions` | `ReactNode` | `—` | Optional custom controls rendered on the left side of the bottom toolbar after built-in pickers. |
| `trailingActions` | `ReactNode` | `—` | Optional custom controls rendered on the right side of the bottom toolbar before voice/send. |
| `footerHint` | `ReactNode` | `—` | Optional hint text rendered beneath the composer (e.g. keyboard shortcut or disclaimer). |
| `labels` | `Partial` | `—` | Localized labels and aria strings. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## AI Message
- **URL**: https://ui.biu.dev/docs/components/ai-message
- **Category**: AI Agents
- **Edition**: Open Source (MIT)
- **Summary**: User & assistant turns with streaming cursor, hoverable inline citations, collapsible Sources drawer, version branches, copy, retry, and feedback reasons.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/ai-message`
- **Install (npm)**: `import { AIMessage } from "@biudev/ui/ai-message"`
- **Public Source**: https://ui.biu.dev/docs/source/ai-message
### Usage
```tsx
import { AiMessage } from "@/components/ui/biu/ai-message";
export function Example() {
return (
{}}
/>
);
}
```
### API Reference
#### AiMessageRole
Inherits: `'user' & 'assistant' & 'system'`
`'user' | 'assistant' | 'system'`
#### AiFeedbackValue
Inherits: `'up' & 'down' & null`
`'up' | 'down' | null`
#### AiCitation
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string \| number` | `—` | 1-based index or stable key referenced as `[id]` inside `content` (e.g. `1`, `2`, or `"doc-1"`). |
| `title` (required) | `string` | `—` | Primary heading or title text. |
| `url` (required) | `string` | `—` | Destination URL for the link or citation. |
| `domain` | `string` | `—` | Hostname or domain label associated with a source. |
| `excerpt` | `string` | `—` | Short excerpt or snippet shown in previews and citation cards. |
| `monogram` | `string` | `—` | Single-character badge monogram for a source or brand. |
#### AiMessageBranch
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `current` (required) | `number` | `—` | Marks the breadcrumb item as the current page, or current 1-based branch index. |
| `total` (required) | `number` | `—` | Total number of items across all pages or branches. |
| `onChange` (required) | `(nextIndex: number) => void` | `—` | Callback invoked when the value changes. |
#### AiMessageLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `copy` (required) | `string` | `—` | Label for the copy action button. |
| `copied` (required) | `string` | `—` | Label shown after content is copied. |
| `copyFailed` | `string` | `—` | Notice shown when clipboard access fails. |
| `retry` (required) | `string` | `—` | Label for retrying an assistant response. |
| `helpful` (required) | `string` | `—` | Accessible label for positive feedback. |
| `unhelpful` (required) | `string` | `—` | Accessible label for negative feedback. |
| `previousBranch` (required) | `string` | `—` | Accessible label for navigating to the previous response branch. |
| `nextBranch` (required) | `string` | `—` | Accessible label for navigating to the next response branch. |
| `usedSources` (required) | `(count: number) => string` | `—` | Formatter for the inline sources summary label. |
| `feedbackPrompt` (required) | `string` | `—` | Heading shown inside the negative feedback popover. |
| `feedbackThanks` (required) | `string` | `—` | Confirmation message shown after submitting feedback. |
| `feedbackReasons` (required) | `readonly string[]` | `—` | Quick-select reasons offered when reporting an issue. |
| `openSource` (required) | `string` | `—` | Label for opening a citation link. |
#### InlineCitationProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `citation` (required) | `AiCitation` | `—` | Citation metadata displayed in the card or chip. |
| `variant` | `'number' \| 'domain'` | `'number'` | Display style: `'number'` shows `[1]` badge; `'domain'` shows compact hostname chip. Defaults to `'number'`. |
| `highlighted` | `boolean` | `false` | Highlighted state synced when hovering a source card. |
| `onHoverChange` | `(hovering: boolean) => void` | `—` | Callback invoked when the hovered state changes. |
| `onSelect` | `(citation: AiCitation) => void` | `—` | Callback invoked when the item is selected. |
| `openSourceLabel` | `string` | `DEFAULT_LABELS.openSource` | Accessible label for opening the cited source URL. |
#### MessageSourcesProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `citations` (required) | `readonly AiCitation[]` | `—` | List of source citations referenced by the message. |
| `open` | `boolean` | `—` | Controlled expanded state. |
| `defaultOpen` | `boolean` | `false` | Uncontrolled initial expanded state. Defaults to `false`. |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `highlightedId` | `string \| number \| null` | `—` | Currently highlighted citation id (e.g. hovered inline chip). |
| `onHoverCitation` | `(id: string \| number \| null) => void` | `—` | Callback invoked when hovering a citation chip. |
| `onSelectCitation` | `(citation: AiCitation) => void` | `—` | Callback invoked when clicking a citation chip. |
| `label` | `(count: number) => string` | `DEFAULT_LABELS.usedSources` | Visible text label or accessible name. |
#### AiMessageProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `role` | `AiMessageRole` | `'assistant'` | Speaker role controlling bubble vs editorial layout. Defaults to `'assistant'`. |
| `author` | `string` | `—` | Optional display author name (e.g. `'Claude Sonnet 4'` or `'You'`). |
| `meta` | `string` | `—` | Optional model or role metadata shown beside the author. |
| `timestamp` | `string` | `—` | Optional formatted timestamp (e.g. `'10:42 AM'`). |
| `avatar` | `ReactNode \| boolean` | `—` | Show an avatar beside assistant turns (or custom `ReactNode` / `false` to hide). Defaults to `true` for assistant turns. |
| `content` | `string` | `—` | Plain text body supporting automatic `[1]`, `[2]` inline citation tokens when `citations` are provided. |
| `children` | `ReactNode` | `—` | Rich custom body content (rendered instead of `content` when provided). |
| `beforeContent` | `ReactNode` | `—` | Optional content rendered above the answer body (e.g. Thinking state or Tool call cards). |
| `attachments` | `readonly { id: string; name: string; meta?: string }[]` | `—` | Optional attachments list displayed on user messages. |
| `citations` | `readonly AiCitation[]` | `—` | Source citations rendered as hoverable inline chips and a collapsible Sources drawer. |
| `citationVariant` | `'number' \| 'domain'` | `'number'` | Display style for auto-parsed inline citations. Defaults to `'number'`. |
| `defaultSourcesOpen` | `boolean` | `false` | Controlled or initial Sources drawer expansion. Defaults to `false`. |
| `onCitationClick` | `(citation: AiCitation) => void` | `—` | Fired when a citation chip or source card is clicked. |
| `streaming` | `boolean` | `false` | Shows animated streaming cursor and agent working ring while response is generating. |
| `copyText` | `string` | `—` | Text copied by the Copy action; defaults to `content`. |
| `copyable` | `boolean` | `—` | Shows the Copy action button when `true` (default for non-streaming assistant turns). |
| `onCopy` | `(text: string) => void` | `—` | Fired after copying message text. |
| `onRetry` | `() => void` | `—` | Shows the Retry / Regenerate button when provided. |
| `feedback` | `AiFeedbackValue` | `—` | Controlled thumbs up/down feedback state. |
| `defaultFeedback` | `AiFeedbackValue` | `null` | Uncontrolled initial feedback state. |
| `onFeedbackChange` | `(value: AiFeedbackValue) => void` | `—` | Fired when the user toggles thumbs up or thumbs down. |
| `showFeedback` | `boolean` | `—` | Enables thumbs up/down action buttons (defaults to `true` when `onFeedbackChange` is provided or on assistant turns). |
| `onFeedbackReason` | `(reason: string) => void` | `—` | Fired when the user picks a dislike reason chip. |
| `branch` | `AiMessageBranch` | `—` | Optional response branch navigation (`1 / 2`). |
| `followUps` | `readonly string[]` | `—` | Optional clickable follow-up prompts rendered beneath the action bar. |
| `onFollowUp` | `(prompt: string) => void` | `—` | Callback invoked when the user selects a follow-up suggestion. |
| `extraActions` | `ReactNode` | `—` | Extra custom buttons placed in the message action bar. |
| `labels` | `Partial` | `—` | Localized labels and aria strings. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Thinking Loader
- **URL**: https://ui.biu.dev/docs/components/thinking-loader
- **Category**: AI Agents
- **Edition**: Open Source (MIT)
- **Summary**: Compact working pill for AI replies with an eight-ray spinner and shimmering label rolling through phases before settling on a check.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/thinking-loader`
- **Install (npm)**: `import { ThinkingLoader } from "@biudev/ui/thinking-loader"`
- **Public Source**: https://ui.biu.dev/docs/source/thinking-loader
### Usage
```tsx
import { ThinkingLoader } from "@/components/ui/biu/thinking-loader";
export function Example() {
return (
);
}
```
### API Reference
#### ThinkingLoaderVariant
Inherits: `'pill' & 'inline'`
`'pill' | 'inline'`
#### ThinkingLoaderSize
Inherits: `'sm' & 'md'`
`'sm' | 'md'`
#### ThinkingLoaderProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `phases` | `readonly string[]` | `DEFAULT_THINKING_LOADER_PHASES` | Progressive status labels rolled through while working. |
| `interval` | `number` | `2000` | Milliseconds per phase. Defaults to `2000`. |
| `done` | `boolean` | `—` | Set `true` once work finishes to morph the 8-ray spinner into a check mark. |
| `doneLabel` | `string` | `'Done'` | Label shown when `done` is `true`. Defaults to `'Done'`. |
| `loop` | `boolean` | `false` | Automatically loops `phases -> done -> reset` for previews. Defaults to `false`. |
| `holdMs` | `number` | `2600` | Hold duration in ms on the completed check state when `loop` is `true`. Defaults to `2600`. |
| `variant` | `ThinkingLoaderVariant` | `'pill'` | Surface framing: `'pill'` (framed rounded badge) or `'inline'` (borderless). Defaults to `'pill'`. |
| `size` | `ThinkingLoaderSize` | `'md'` | Compact `'sm'` or default `'md'` sizing. Defaults to `'md'`. |
| `showTimer` | `boolean` | `false` | Show a subtle elapsed seconds counter beside the phase label. Defaults to `false`. |
| `onPhaseChange` | `(index: number, phase: string) => void` | `—` | Fired whenever the active phase index advances. |
| `onComplete` | `() => void` | `—` | Fired when a looping sequence reaches the `done` state. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Thinking State
- **URL**: https://ui.biu.dev/docs/components/thinking-state
- **Category**: AI Agents
- **Edition**: Open Source (MIT)
- **Summary**: AI working timeline with animated pixel matrix, live timer, searched source chips, step-by-step reasoning, and drawn completion check.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/thinking-state`
- **Install (npm)**: `import { ThinkingState } from "@biudev/ui/thinking-state"`
- **Public Source**: https://ui.biu.dev/docs/source/thinking-state
### Usage
```tsx
import { ThinkingState } from "@/components/ui/biu/thinking-state";
export function Example() {
return (
);
}
```
### API Reference
#### ThinkingStateVariant
Inherits: `'inline' & 'card'`
`'inline' | 'card'`
#### ThinkingStateSource
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `domain` | `string` | `—` | Hostname or domain label associated with a source. |
| `href` | `string` | `—` | Navigation target URL. |
| `monogram` | `string` | `—` | Single-character badge monogram for a source or brand. |
| `color` | `string` | `—` | Accent or swatch CSS color value. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
#### ThinkingStateStep
Inherits: `string`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `kind` | `'thinking' \| 'search'` | `—` | Entity or item classification kind. |
| `text` | `string` | `—` | Plain text content for the item or status. |
| `activeText` | `string` | `—` | Label shown while this step is actively running (e.g. `'Searching'` -> `'Searched'`). |
| `status` | `'pending' \| 'running' \| 'done'` | `—` | Current lifecycle or execution status. |
| `detail` | `string` | `—` | Additional detail text displayed when expanded or inspected. |
| `badge` | `string` | `—` | Optional badge value or count displayed beside the label. |
| `sources` | `readonly ThinkingStateSource[]` | `—` | Source pills displayed under a search step. |
| `moreSources` | `readonly ThinkingStateSource[]` | `—` | Extra sources revealed when clicking the `+N more` pill. |
#### ThinkingStateLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `thinking` (required) | `string` | `—` | Label shown while the model is actively reasoning. |
| `thoughtFor` (required) | `(seconds: string) => string` | `—` | Formatter for completed reasoning duration. |
| `workedFor` (required) | `(seconds: string) => string` | `—` | Formatter for total agent work duration. |
| `thoughtDone` (required) | `string` | `—` | Label shown when reasoning finished without a duration. |
#### ThinkingStateProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `streaming` | `boolean` | `false` | Whether the model is actively reasoning/streaming. Defaults to `false`. |
| `duration` | `number` | `—` | Elapsed duration in seconds (displayed once complete, or live while streaming if omitted). |
| `open` | `boolean` | `—` | Controlled expanded state. |
| `defaultOpen` | `boolean` | `—` | Uncontrolled initial expanded state. Defaults to `streaming` (or `true` when `stepMs` is set). |
| `autoCollapse` | `boolean` | `—` | Automatically collapses when `streaming` transitions from `true` to `false`. Defaults to `true` (disabled automatically when `doneLabel` is set). |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `variant` | `ThinkingStateVariant` | `'inline'` | Visual framing: `'inline'` (minimal subtle bar) or `'card'` (soft bordered container). Defaults to `'inline'`. |
| `title` | `ReactNode` | `—` | Optional custom heading override (replaces `Thinking…` / `Thought for 4.2s`). |
| `steps` | `readonly ThinkingStateStep[]` | `—` | Optional ordered reasoning and search steps displayed as a connected timeline. |
| `doneLabel` | `string` | `—` | Label of the final completion row shown once reasoning finishes (e.g. `'Finished thinking'`). |
| `stepMs` | `number` | `—` | When set (e.g. `1300`), automatically reveals `steps` one by one at this millisecond interval. |
| `loop` | `boolean` | `false` | Automatically replays the `stepMs` sequence after `holdMs`. Defaults to `false`. |
| `holdMs` | `number` | `3400` | Milliseconds to hold the completed state before looping. Defaults to `3400`. |
| `onComplete` | `() => void` | `—` | Fired whenever an auto-stepping sequence finishes. |
| `children` | `ReactNode` | `—` | Custom reasoning text or JSX body. |
| `labels` | `Partial` | `—` | Localized labels. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Message Scroller
- **URL**: https://ui.biu.dev/docs/components/message-scroller
- **Category**: AI Agents
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Streaming chat viewport that follows live output until scrolled away, with a floating Latest jump button and a minimalist message navigation rail.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/message-scroller` (Pro license required)
### Usage
```tsx
import { MessageScroller } from "@/components/ui/biu/message-scroller";
import { AiMessage } from "@/components/ui/biu/ai-message";
export function Example() {
return (
);
}
```
### API Reference
#### MessageScrollerRole
Inherits: `'user' & 'assistant' & 'system'`
`'user' | 'assistant' | 'system'`
#### MessageScrollerNavItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Stable identifier derived from the rendered message element. |
| `role` (required) | `MessageScrollerRole` | `—` | Speaker role used to style the rail tick and preview badge. |
| `preview` (required) | `string` | `—` | Short single-line text preview extracted from the message. |
| `index` (required) | `number` | `—` | Zero-based turn index in the rendered transcript. |
#### MessageScrollerLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Default accessible label for the transcript `role="log"`. |
| `jumpToLatest` (required) | `string` | `—` | Label shown on the floating jump-to-latest button. |
| `navigationLabel` (required) | `string` | `—` | Accessible label for the optional right-hand navigation rail. |
| `preview` (required) | `string` | `—` | Accessible label for the hover/focus rail preview card. |
| `goToUser` (required) | `string` | `—` | Speaker prefix for user turns in the navigation rail. |
| `goToAssistant` (required) | `string` | `—` | Speaker prefix for assistant turns in the navigation rail. |
| `goToMessage` (required) | `string` | `—` | Fallback speaker prefix for system or untyped turns. |
#### MessageScrollerProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` | `—` | Message elements rendered inside the scrollable transcript log. |
| `followOutput` | `boolean` | `true` | Keep streamed output pinned while the reader remains near the end. Defaults to `true`. |
| `followThreshold` | `number` | `56` | Pixel distance from the bottom edge that still counts as following live output. Defaults to `56`. |
| `smooth` | `boolean` | `true` | Smoothly follow growing content and scroll jumps. Defaults to `true`. |
| `onFollowChange` | `(following: boolean) => void` | `—` | Reports whenever the reader leaves or returns to the live bottom edge. |
| `label` | `string` | `—` | Accessible label for the scrollable transcript log. |
| `busy` | `boolean` | `false` | Marks the transcript as actively streaming or awaiting more output (`aria-busy`). |
| `navigation` | `'rail'` | `—` | Adds a compact minimalist rail along the right edge for jumping between message rows. |
| `jumpButton` | `boolean` | `true` | Shows a floating button back to the latest message once scrolled up. Defaults to `true`. |
| `navigationLabel` | `string` | `—` | Accessible label for the optional message navigation rail. |
| `viewportClassName` | `string` | `—` | Extra classes merged onto the scrolling viewport wrapper. |
| `contentClassName` | `string` | `—` | Extra classes merged onto the `role="log"` element wrapping messages. |
| `railClassName` | `string` | `—` | Extra classes merged onto the navigation rail when `navigation="rail"`. |
| `viewportRef` | `Ref` | `—` | Ref assigned to the underlying scrolling viewport element. |
| `viewportProps` | `Omit, 'children' \| 'ref' \| 'className'>` | `—` | Extra HTML attributes merged onto the outer viewport container. |
| `contentProps` | `Omit, 'children' \| 'ref' \| 'className'>` | `—` | Extra HTML attributes merged onto the `role="log"` content element. |
| `labels` | `Partial` | `—` | Localized accessible strings and labels. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Tool Call Card
- **URL**: https://ui.biu.dev/docs/components/tool-call-card
- **Category**: AI Agents
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Expandable agent tool invocation cards with running, success, and error states, latency timers, and copyable JSON input/output blocks.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/tool-call-card` (Pro license required)
### Usage
```tsx
import { ToolCallCard } from "@/components/ui/biu/tool-call-card";
export function Example() {
return (
);
}
```
### API Reference
#### ToolCallStatus
Inherits: `'pending' & 'running' & 'success' & 'error'`
`'pending' | 'running' | 'success' | 'error'`
#### ToolCallCardLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `input` (required) | `string` | `—` | Structured input payload passed to the tool. |
| `output` (required) | `string` | `—` | Structured output returned by the tool. |
| `error` (required) | `string` | `—` | Validation error message or error state. |
| `copy` (required) | `string` | `—` | Label for the copy action button. |
| `copied` (required) | `string` | `—` | Label shown after content is copied. |
| `statusLabels` (required) | `Record` | `—` | Localized labels mapped to each execution status. |
#### ToolCallCardProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` (required) | `string` | `—` | Tool or function identifier (e.g. `'read_file'`, `'search_docs'`, `'run_sql'`). |
| `summary` | `string` | `—` | Short argument or target summary shown inline beside the tool name (e.g. `'src/router.ts'`). |
| `status` | `ToolCallStatus` | `'success'` | Execution lifecycle status. Defaults to `'success'`. |
| `duration` | `string` | `—` | Formatted duration string (e.g. `'142ms'`, `'1.8s'`). |
| `icon` | `ReactNode` | `—` | Optional decorative icon replacing the default status indicator. |
| `input` | `unknown` | `—` | Structured input arguments or command string shown when expanded. |
| `output` | `unknown` | `—` | Structured tool result or log output shown when expanded. |
| `error` | `string` | `—` | Error message shown in a highlighted red block when `status === 'error'`. |
| `children` | `ReactNode` | `—` | Custom expanded detail content rendered below input/output. |
| `open` | `boolean` | `—` | Controlled expanded state. |
| `defaultOpen` | `boolean` | `false` | Uncontrolled initial expanded state. Defaults to `false`. |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `variant` | `'card' \| 'compact'` | `'card'` | Visual framing: `'card'` (bordered tile) or `'compact'` (quiet borderless row). Defaults to `'card'`. |
| `labels` | `Partial` | `—` | Localized labels. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
#### ToolCallGroupProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Approval Card
- **URL**: https://ui.biu.dev/docs/components/approval-card
- **Category**: AI Agents
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Human-in-the-loop authorization gate with risk badges, command preview, Allow once / Always allow / Reject actions, and optional rejection note.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/approval-card` (Pro license required)
### Usage
```tsx
import { ApprovalCard } from "@/components/ui/biu/approval-card";
export function Example() {
return (
console.log(decision)}
/>
);
}
```
### API Reference
#### ApprovalStatus
Inherits: `'pending' & 'approved' & 'always-approved' & 'rejected'`
`'pending' | 'approved' | 'always-approved' | 'rejected'`
#### ApprovalRisk
Inherits: `'low' & 'medium' & 'high'`
`'low' | 'medium' | 'high'`
#### ApprovalDetail
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `value` (required) | `string` | `—` | Controlled current value. |
#### ApprovalCardLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `eyebrow` (required) | `string` | `—` | Small uppercase eyebrow label above the card title. |
| `allow` (required) | `string` | `—` | Label for the Allow once button. |
| `alwaysAllow` (required) | `string` | `—` | Label for the Always allow button. |
| `reject` (required) | `string` | `—` | Label for the Reject button. |
| `rejectPlaceholder` (required) | `string` | `—` | Placeholder text for the optional rejection reason input. |
| `confirmReject` (required) | `string` | `—` | Label for confirming rejection. |
| `cancel` (required) | `string` | `—` | Label for cancelling the rejection form. |
| `approved` (required) | `string` | `—` | Status badge label after approval. |
| `alwaysApproved` (required) | `string` | `—` | Status badge label after persistent approval. |
| `rejected` (required) | `string` | `—` | Status badge label after rejection. |
| `riskLabels` (required) | `Record` | `—` | Localized labels mapped to approval risk levels. |
#### ApprovalCardProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` (required) | `string` | `—` | Headline summarizing the requested agent action (e.g. `'Run database migration'`). |
| `description` | `string` | `—` | Optional explanation of why the agent wants to perform this action. |
| `tool` | `string` | `—` | Tool or target identifier displayed as a compact code badge (e.g. `'shell.exec'`). |
| `command` | `string` | `—` | Command or payload preview rendered in a monospace block. |
| `details` | `readonly ApprovalDetail[]` | `—` | Optional key-value metadata rows (e.g. Target, Scope, Impact). |
| `risk` | `ApprovalRisk` | `'medium'` | Risk level controlling the header accent pill. Defaults to `'medium'`. |
| `status` | `ApprovalStatus` | `—` | Controlled decision state. |
| `defaultStatus` | `ApprovalStatus` | `'pending'` | Uncontrolled initial decision state. Defaults to `'pending'`. |
| `onDecision` | `(decision: Exclude, reason?: string) => void` | `—` | Fired when the user approves once (`'approved'`), always approves (`'always-approved'`), or rejects (`'rejected'`). |
| `allowAlways` | `boolean` | `true` | Shows the `'Always allow'` secondary option when `true`. Defaults to `true`. |
| `collectRejectReason` | `boolean` | `false` | Prompts for an optional rejection note when clicking Reject. Defaults to `false`. |
| `children` | `ReactNode` | `—` | Custom extra content rendered inside the card body. |
| `labels` | `Partial` | `—` | Localized labels. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Decision Card
- **URL**: https://ui.biu.dev/docs/components/decision-card
- **Category**: AI Agents
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Queued agent decision card docked above the chat composer with numbered 1–5 options, Recommended badge, preview tiles, custom reply row, and Later folding.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/decision-card` (Pro license required)
### Usage
```tsx
import { DecisionCard } from "@/components/ui/biu/decision-card";
export function Example() {
return (
console.log(id, answer)}
/>
);
}
```
### API Reference
#### DecisionKind
Inherits: `'options' & 'approval' & 'tiles'`
`'options' | 'approval' | 'tiles'`
#### DecisionOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique option identifier returned in `onDecide`. |
| `label` (required) | `string` | `—` | Primary option title. |
| `description` | `string` | `—` | Optional rationale or trade-off description shown beneath the label. |
| `recommended` | `boolean` | `—` | Highlights this option with a Recommended badge. |
| `preview` | `ReactNode` | `—` | Optional custom preview visual rendered in `'tiles'` mode. |
| `badge` | `string` | `—` | Optional secondary metadata pill (e.g. cost, latency, tag). |
#### DecisionItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique decision identifier. |
| `question` (required) | `string` | `—` | The question the agent needs answered before continuing. |
| `description` | `string` | `—` | Optional supporting context beneath the question. |
| `task` | `string` | `—` | Originating task, run, or agent label shown in the top bar. |
| `eyebrow` | `string` | `—` | Custom eyebrow pill overriding `labels.eyebrow`. |
| `kind` | `DecisionKind` | `—` | Presentation mode: numbered `'options'` (default), `'approval'`, or `'tiles'`. |
| `options` | `readonly DecisionOption[]` | `—` | Selectable choices for `'options'` and `'tiles'` kinds. |
| `allowCustom` | `boolean` | `—` | Shows the final free-text row so the user can reply in their own words. Defaults to `true`. |
| `customPlaceholder` | `string` | `—` | Placeholder copy for the free-text row. |
| `approveLabel` | `string` | `—` | Custom approve button copy when `kind="approval"`. |
| `declineLabel` | `string` | `—` | Custom decline button copy when `kind="approval"`. |
#### DecisionOptionAnswer
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `option` (required) | `string` | `—` | Selected option or tile identifier. |
#### DecisionTextAnswer
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` (required) | `string` | `—` | Free-text answer entered by the user. |
#### DecisionAnswer
Inherits: `DecisionOptionAnswer & DecisionTextAnswer & 'approve' & 'decline'`
`DecisionOptionAnswer | DecisionTextAnswer | 'approve' | 'decline'`
#### DecisionCardLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `eyebrow` (required) | `string` | `—` | Default eyebrow pill text shown in the card header. |
| `recommended` (required) | `string` | `—` | Badge label rendered beside recommended options. |
| `later` (required) | `string` | `—` | Button label that folds the decision card for later. |
| `resume` (required) | `(count: number) => string` | `—` | Formatter returning the folded bar summary for `count` queued decisions. |
| `customPlaceholder` (required) | `string` | `—` | Default placeholder for the custom-answer text input. |
| `submitCustom` (required) | `string` | `—` | Accessible label for the custom-answer submit button. |
| `approve` (required) | `string` | `—` | Default primary button label in `'approval'` mode. |
| `decline` (required) | `string` | `—` | Default secondary button label in `'approval'` mode. |
| `prevDecision` (required) | `string` | `—` | Accessible label for the previous-decision pager button. |
| `nextDecision` (required) | `string` | `—` | Accessible label for the next-decision pager button. |
| `pager` (required) | `(current: number, total: number) => string` | `—` | Formatter for the pager indicator (e.g. `'1 of 3'`). |
| `keyboardHint` (required) | `string` | `—` | Optional keyboard shortcut hint text. |
#### DecisionCardProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `decisions` (required) | `readonly DecisionItem[]` | `—` | Open decisions ordered oldest-first; drop answered items from the array in `onDecide`. |
| `onDecide` | `(id: string, answer: DecisionAnswer) => void` | `—` | Fired when the user picks an option/tile, approves/declines, or submits custom words. |
| `onLater` | `(id: string) => void` | `—` | Fired when the user clicks Later to defer the active decision. |
| `folded` | `boolean` | `—` | Controlled collapsed state when deferred to a single line. |
| `defaultFolded` | `boolean` | `false` | Initial uncontrolled folded state. Defaults to `false`. |
| `onFoldedChange` | `(folded: boolean) => void` | `—` | Fired when the card folds via Later or unfolds via Resume. |
| `activeIndex` | `number` | `—` | Controlled zero-based index of the currently displayed decision. |
| `onActiveIndexChange` | `(index: number) => void` | `—` | Fired when the user steps through queued decisions with the pager. |
| `keyboardShortcuts` | `boolean` | `true` | Enables keyboard shortcuts (`1-5`, arrows, Enter, Escape) while focus is inside the card. Defaults to `true`. |
| `labels` | `Partial` | `—` | Localized labels and accessible strings. |
| `'aria-label'` | `string` | `'Agent decision'` | Accessible label for the decision card region. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Agent Activity
- **URL**: https://ui.biu.dev/docs/components/agent-activity
- **Category**: AI Agents
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Connected vertical execution plan & step timeline with live progress bar, collapsible card, agent tags, and clickable step inspection.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/agent-activity` (Pro license required)
### Usage
```tsx
import { AgentActivity } from "@/components/ui/biu/agent-activity";
export function Example() {
return (
);
}
```
### API Reference
#### AgentStepStatus
Inherits: `'pending' & 'running' & 'done' & 'blocked' & 'skipped'`
`'pending' | 'running' | 'done' | 'blocked' | 'skipped'`
#### AgentActivityStep
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `title` (required) | `string` | `—` | Primary heading or title text. |
| `status` (required) | `AgentStepStatus` | `—` | Current lifecycle or execution status. |
| `detail` | `string` | `—` | Optional secondary description or live output summary. |
| `tag` | `string` | `—` | Optional agent or tool badge (e.g. `'Scout'`, `'read_file'`). |
| `duration` | `string` | `—` | Optional elapsed duration (e.g. `'1.4s'`, `'240ms'`). |
| `timestamp` | `string` | `—` | Optional timestamp (e.g. `'10:42:08'`). |
#### AgentActivityLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `progress` (required) | `(done: number, total: number) => string` | `—` | Completion percentage (0–100) for running progress bars. |
| `statusLabels` (required) | `Record` | `—` | Localized labels mapped to each execution status. |
#### AgentActivityProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `string` | `'Execution plan'` | Plan or run title shown in the header (e.g. `'Execution plan'`). |
| `subtitle` | `string` | `—` | Optional subtitle shown beside or below the title. |
| `steps` (required) | `readonly AgentActivityStep[]` | `—` | Ordered execution steps. |
| `variant` | `'card' \| 'inline'` | `'card'` | Visual framing: `'card'` (framed container with header) or `'inline'` (borderless timeline). Defaults to `'card'`. |
| `showProgress` | `boolean` | `true` | Shows a slim progress bar in the header when `variant === 'card'`. Defaults to `true`. |
| `collapsible` | `boolean` | `false` | Allows collapsing/expanding the step list from the header. Defaults to `false`. |
| `open` | `boolean` | `—` | Controlled open visibility state. |
| `defaultOpen` | `boolean` | `true` | Initial open state when uncontrolled. |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `activeStepId` | `string \| null` | `—` | Currently selected step id (highlighted when steps are clickable). |
| `onStepClick` | `(step: AgentActivityStep) => void` | `—` | Makes steps interactive buttons and fires when a step is clicked. |
| `headerAction` | `ReactNode` | `—` | Optional trailing header control (e.g. Pause/Resume button). |
| `footer` | `ReactNode` | `—` | Optional footer slot beneath the timeline (e.g. token & cost summary). |
| `labels` | `Partial` | `—` | Localized labels. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Button
- **URL**: https://ui.biu.dev/docs/components/button
- **Category**: Actions
- **Edition**: Open Source (MIT)
- **Summary**: Trigger actions with primary, secondary, ghost, destructive, and animated loading states.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/button`
- **Install (npm)**: `import { Button } from "@biudev/ui/button"`
- **Public Source**: https://ui.biu.dev/docs/source/button
### Usage
```tsx
import { useState } from "react";
import { Button } from "@/components/ui/biu/button";
export function Example() {
const [saved, setSaved] = useState(false);
return ;
}
```
### API Reference
#### ButtonProps
Inherits: `ComponentPropsWithRef<'button'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'destructive'` | `'primary'` | Visual style variant of the button. |
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Height and padding scale of the button. |
| `loading` | `boolean` | `false` | Shows a loading indicator and suppresses click activation while busy. |
| `icon` | `ReactNode` | `—` | Leading icon rendered before the button label. |
| `iconRight` | `ReactNode` | `—` | Trailing icon rendered after the button label. |
#### ButtonLinkProps
Inherits: `ComponentPropsWithRef<'a'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `ButtonProps['variant']` | `'primary'` | Visual style variant of the link button. |
| `size` | `ButtonProps['size']` | `'md'` | Height and padding scale of the link button. |
| `icon` | `ReactNode` | `—` | Leading icon rendered before the link label. |
| `iconRight` | `ReactNode` | `—` | Trailing icon rendered after the link label. |
| `disabled` | `boolean` | `false` | Disables navigation and applies disabled styling. |
---
## Button Group
- **URL**: https://ui.biu.dev/docs/components/button-group
- **Category**: Actions
- **Edition**: Open Source (MIT)
- **Summary**: Group related actions and split buttons with unified tactile geometry.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/button-group`
- **Install (npm)**: `import { ButtonGroup } from "@biudev/ui/button-group"`
- **Public Source**: https://ui.biu.dev/docs/source/button-group
### Usage
```tsx
import { useState } from "react";
import { Button } from "@/components/ui/biu/button";
import { ButtonGroup } from "@/components/ui/biu/button-group";
export function Example() {
const [alignment, setAlignment] = useState("Left");
return (
Selected: {alignment}
);
}
```
### API Reference
#### ButtonGroupProps
Inherits: `ComponentPropsWithRef<'div'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `variant` | `ButtonProps['variant']` | `—` | Visual style variant. |
| `size` | `ButtonProps['size']` | `—` | Size tier controlling height, padding, and typography. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `orientation` | `'horizontal'\|'vertical'` | `'horizontal'` | Layout axis (horizontal or vertical). |
| `fullWidth` | `boolean` | `false` | Stretches the control to fill 100% of its container width. |
| `separators` | `boolean` | `true` | Shows subtle divider lines between grouped buttons. |
---
## Icon Button
- **URL**: https://ui.biu.dev/docs/components/icon-button
- **Category**: Actions
- **Edition**: Open Source (MIT)
- **Summary**: Compact icon-only actions with required accessible labels and pressed toggle state.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/icon-button`
- **Install (npm)**: `import { IconButton } from "@biudev/ui/icon-button"`
- **Public Source**: https://ui.biu.dev/docs/source/icon-button
### Usage
```tsx
import { useState } from "react";
import { Filter, Pin, Plus } from "lucide-react";
import { IconButton } from "@/components/ui/biu/icon-button";
export function RunsToolbar({ onFilter, onNew }: { onFilter: () => void; onNew: () => void }) {
const [pinned, setPinned] = useState(false);
return (
} onClick={onFilter} />
}
pressed={pinned}
onClick={() => setPinned((value) => !value)}
/>
} onClick={onNew} />
);
}
```
### API Reference
#### IconButtonProps
Inherits: `Omit,'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `icon` (required) | `ReactNode` | `—` | Leading icon element. |
| `variant` | `'ghost'\|'secondary'\|'primary'` | `'ghost'` | Visual style variant. |
| `size` | `'sm'\|'md'` | `'md'` | Size tier controlling height, padding, and typography. |
| `pressed` | `boolean` | `—` | Controlled pressed toggle state for icon buttons. |
---
## Input
- **URL**: https://ui.biu.dev/docs/components/input
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Single-line text fields with labels, hints, copyable text, validation errors, and clear controls.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/input`
- **Install (npm)**: `import { Input } from "@biudev/ui/input"`
- **Public Source**: https://ui.biu.dev/docs/source/input
### Usage
```tsx
import { TextField } from "@/components/ui/biu/input";
export function Example() {
return ;
}
```
### API Reference
#### InputProps
Inherits: `ComponentPropsWithRef<'input'>`
`ComponentPropsWithRef<'input'>`
#### TextFieldProps
Inherits: `Omit, 'size' | 'prefix'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `ReactNode` | `—` | Visible text label or accessible name. |
| `hint` | `ReactNode` | `—` | Helper text or inline hint shown alongside the item or field. |
| `error` | `ReactNode` | `—` | Validation error message or error state. |
| `prefix` | `ReactNode` | `—` | Leading static affix rendered inside the input box. |
| `suffix` | `ReactNode` | `—` | Trailing static affix rendered inside the input box. |
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size tier controlling height, padding, and typography. |
| `optional` | `boolean` | `—` | Displays an optional badge next to the field label. |
| `optionalText` | `string` | `'Optional'` | Custom text for the optional indicator badge. |
| `actionLabels` | `{ clear?: string; showPassword?: string; hidePassword?: string; copy?: string; copied?: string }` | `—` | Localized accessible labels for inline field actions. |
| `clearable` | `boolean` | `—` | Shows a clear button when the field has a value. |
| `copyable` | `boolean` | `—` | Shows a one-click copy button inside the input. |
| `counter` | `boolean` | `—` | Shows a live character counter below the field. |
| `onClear` | `() => void` | `—` | Callback fired after clearing the input value. |
| `inputClassName` | `string` | `—` | Additional CSS class name applied to the inner input element. |
---
## Text Area
- **URL**: https://ui.biu.dev/docs/components/text-area
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Multi-line text input with auto-grow sizing and live character count feedback.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/text-area`
- **Install (npm)**: `import { TextArea } from "@biudev/ui/text-area"`
- **Public Source**: https://ui.biu.dev/docs/source/text-area
### Usage
```tsx
import { TextArea } from "@/components/ui/biu/text-area";
export function Example() {
return ;
}
```
### API Reference
#### TextAreaProps
Inherits: `Omit, 'className'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `ReactNode` | `—` | Visible text label or accessible name. |
| `hint` | `ReactNode` | `—` | Helper text or inline hint shown alongside the item or field. |
| `error` | `ReactNode` | `—` | Validation error message or error state. |
| `optional` | `boolean` | `—` | Displays an optional badge next to the field label. |
| `optionalText` | `string` | `'Optional'` | Custom text for the optional indicator badge. |
| `counter` | `boolean` | `—` | Shows a live character counter below the field. |
| `minRows` | `number` | `3` | Minimum visible text rows for auto-resizing textareas. |
| `maxRows` | `number` | `10` | Maximum text rows before the textarea scrolls vertically. |
| `expandable` | `boolean` | `—` | Allows toggling the textarea to an expanded height. |
| `expandedRows` | `number` | `16` | Row height used when the textarea is expanded. |
| `expanded` | `boolean` | `—` | Controlled expanded state. |
| `expandLabel` | `string` | `'More room'` | Accessible label for expanding the sidebar or panel. |
| `collapseLabel` | `string` | `'Less room'` | Accessible label for collapsing the sidebar or panel. |
| `onExpandedChange` | `(expanded: boolean) => void` | `—` | Callback invoked when expanded state toggles. |
| `onSubmitShortcut` | `(value: string) => void` | `—` | Callback fired when pressing Cmd/Ctrl+Enter inside the field. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `inputClassName` | `string` | `—` | Additional CSS class name applied to the inner input element. |
---
## Tag Input
- **URL**: https://ui.biu.dev/docs/components/tag-input
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Create, edit, and remove structured tags with keyboard navigation and validation.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/tag-input`
- **Install (npm)**: `import { TagInput } from "@biudev/ui/tag-input"`
- **Public Source**: https://ui.biu.dev/docs/source/tag-input
### Usage
```tsx
import { useState } from "react";
import { TagInput } from "@/components/ui/biu/tag-input";
export function Example() {
const [tags, setTags] = useState(["Design"]);
return ;
}
```
### API Reference
#### TagInputOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Controlled current value. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `group` | `string` | `—` | Group name used to organize options. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
| `hint` | `string` | `—` | Helper text or inline hint shown alongside the item or field. |
| `keywords` | `string[]` | `—` | Additional search keywords matched during filtering. |
#### TagInputProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string[]` | `—` | Controlled current value. |
| `defaultValue` | `string[]` | `[]` | Initial value used when operating in uncontrolled mode. |
| `onChange` | `(tags: string[]) => void` | `—` | Callback invoked when the value changes. |
| `label` | `ReactNode` | `—` | Visible text label or accessible name. |
| `hint` | `ReactNode` | `—` | Helper text or inline hint shown alongside the item or field. |
| `error` | `ReactNode` | `—` | Validation error message or error state. |
| `optional` | `boolean` | `—` | Displays an optional badge next to the field label. |
| `optionalText` | `string` | `'Optional'` | Custom text for the optional indicator badge. |
| `addMoreText` | `string` | `'Add more…'` | Placeholder shown after at least one tag is present. |
| `selectedText` | `string` | `'selected'` | Label shown beside the selected item counter. |
| `navigationHint` | `string` | `'↑ ↓ to move · ↵ to select'` | Keyboard navigation hint displayed in the menu footer. |
| `openText` | `string` | `'Open options'` | Accessible label for opening the suggestions dropdown. |
| `closeText` | `string` | `'Close options'` | Accessible label for closing the suggestions dropdown. |
| `removeLabel` | `(label: string) => string` | `text => `Remove ${text}`` | Accessible label for removing a chip or attachment. |
| `placeholder` | `string` | `—` | Placeholder text displayed when the input is empty. |
| `messages` | `{ max?: (count: number) => string; added?: (label: string) => string; addedMany?: (count: number) => string; removed?: (label: string) => string; armed?: (label: string) => string; moreSelected?: (count: number) => string }` | `—` | Localized screen-reader announcement formatters. |
| `validate` | `(tag: string) => true \| string` | `—` | Validation function returning a map of field errors for the step. |
| `normalize` | `(tag: string) => string` | `text => text.trim()` | Normalizes raw input text before creating or deduplicating tags. |
| `splitOnSpace` | `boolean` | `false` | Commits a tag whenever the user types a space. |
| `max` | `number` | `—` | Maximum allowed count, capacity, or character limit. |
| `avatar` | `boolean` | `—` | Avatar image URL, element, or initials. |
| `name` | `string` | `—` | Form field name or display name. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `options` | `readonly TagInputOption[]` | `—` | Available selectable options. |
| `emptyMessage` | `string` | `'No options found.'` | Message shown when no matching options remain. |
| `comboboxBehavior` | `boolean` | `false` | Enables searchable multi-select combobox behavior. |
| `multiple` | `boolean` | `true` | Allows selecting multiple options simultaneously. |
| `creatable` | `boolean` | `false` | Allows creating new options when the query has no exact match. |
| `onCreate` | `(text: string) => TagInputOption \| void` | `—` | Callback invoked when the user creates a new option. |
| `createLabel` | `(text: string) => string` | `text => `Create “${text}”`` | Formatter for the inline create-new-option label. |
| `maxVisibleTags` | `number` | `—` | Maximum number of tags shown before collapsing into a +N chip. |
| `defaultOpen` | `boolean` | `false` | Initial open state when uncontrolled. |
| `id` | `string` | `—` | Unique identifier for this element or item. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `ref` | `Ref` | `—` | React ref forwarded to the underlying DOM element. |
| `'aria-label'` | `string` | `—` | Accessible label for assistive technologies. |
| `'aria-describedby'` | `string` | `—` | ID of the element that describes this component. |
---
## OTP Input
- **URL**: https://ui.biu.dev/docs/components/otp-input
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: One-time verification code input with gliding focus ring, SMS autofill, shake-on-error, and Verified pill morph.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/otp-input`
- **Install (npm)**: `import { OTPInput } from "@biudev/ui/otp-input"`
- **Public Source**: https://ui.biu.dev/docs/source/otp-input
### Usage
```tsx
"use client";
import { useState } from "react";
import { OtpInput } from "@/components/ui/biu/otp-input";
export function Example() {
const [code, setCode] = useState("");
return ;
}
```
### API Reference
#### OtpStatus
Inherits: `'idle' & 'verifying' & 'error' & 'success'`
`'idle' | 'verifying' | 'error' | 'success'`
#### OtpVariant
Inherits: `'box' & 'underline' & 'pill'`
`'box' | 'underline' | 'pill'`
#### OtpSize
Inherits: `'sm' & 'md' & 'lg'`
`'sm' | 'md' | 'lg'`
#### OtpPattern
Inherits: `'numeric' & 'alphanumeric' & 'alpha' & RegExp`
`'numeric' | 'alphanumeric' | 'alpha' | RegExp`
#### OtpInputLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `verifying` (required) | `string` | `—` | Status message shown while OTP verification is in progress. |
| `resendPrompt` (required) | `string` | `—` | Helper text preceding the resend-code button. |
| `resendAction` (required) | `string` | `—` | Label for the resend verification code button. |
| `resendIn` (required) | `(seconds: number) => string` | `—` | Formatter for the resend cooldown countdown. |
| `digitsHint` (required) | `(length: number) => string` | `—` | Accessible hint describing the expected digit count. |
#### OtpInputProps
Inherits: `Omit, 'onChange' | 'defaultValue'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `length` | `number` | `6` | Number of OTP slots (1–12). Defaults to `6`. |
| `value` | `string` | `—` | Controlled value. |
| `defaultValue` | `string` | `''` | Initial uncontrolled value. |
| `onChange` | `(code: string) => void` | `—` | Called whenever the sanitized OTP value changes. |
| `onComplete` | `(code: string) => void` | `—` | Called once when all `length` slots are filled. |
| `variant` | `OtpVariant` | `'box'` | Visual slot style inspired by AffectUI (`box`) and ExpoKit (`underline`, `pill`). Defaults to `'box'`. |
| `size` | `OtpSize` | `'md'` | Slot scale. Shrinks responsively inside narrow containers. Defaults to `'md'`. |
| `separator` | `boolean \| number` | `false` | Insert a dash separator (`true` splits in half, or pass a specific slot index such as `3`). |
| `pattern` | `OtpPattern` | `'numeric'` | Allowed character filter. Defaults to `'numeric'`. |
| `masked` | `boolean` | `false` | Mask entered characters with dots for PIN/passcode entry. Defaults to `false`. |
| `status` | `OtpStatus` | `'idle'` | Verification lifecycle state driving shimmer, error shake, and Verified pill morph. |
| `errorMessage` | `ReactNode` | `"That code didn't work. Try again."` | Error message shown when `status="error"`. |
| `clearOnError` | `boolean` | `false` | Automatically animate out and clear the code shortly after `status="error"`. Defaults to `false`. |
| `successLabel` | `string` | `'Verified'` | Label shown inside the morphed green pill when `status="success"`. Defaults to `'Verified'`. |
| `onResend` | `() => void` | `—` | Optional callback to render a built-in resend footer with countdown timer. |
| `resendIn` | `number` | `30` | Countdown seconds before resend is enabled. Defaults to `30`. |
| `align` | `'start' \| 'center'` | `'start'` | Horizontal alignment of slots and helper messages. Defaults to `'start'`. |
| `disabled` | `boolean` | `false` | Disable interaction. |
| `autoFocus` | `boolean` | `false` | Focus the hidden input on mount. |
| `label` | `string` | `'Verification code'` | Accessible label for the underlying `one-time-code` input. Defaults to `'Verification code'`. |
| `name` | `string` | `—` | Form field name forwarded to the native input. |
| `labels` | `Partial` | `—` | Override status / resend copy for any language or i18n library. |
---
## Checkbox
- **URL**: https://ui.biu.dev/docs/components/checkbox
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Binary, indeterminate, and card-style selection controls with crisp focus halos.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/checkbox`
- **Install (npm)**: `import { Checkbox } from "@biudev/ui/checkbox"`
- **Public Source**: https://ui.biu.dev/docs/source/checkbox
### Usage
```tsx
import { Checkbox } from "@/components/ui/biu/checkbox";
export function Example() {
return ;
}
```
### API Reference
#### CheckboxProps
Inherits: `Omit, 'type' | 'size'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `ReactNode` | `—` | Visible text label or accessible name. |
| `description` | `ReactNode` | `—` | Secondary supporting description text. |
| `indeterminate` | `boolean` | `false` | Renders the checkbox in an indeterminate mixed state. |
| `error` | `ReactNode` | `—` | Validation error message or error state. |
| `variant` | `'plain' \| 'card'` | `'plain'` | Visual style variant. |
---
## Switch
- **URL**: https://ui.biu.dev/docs/components/switch
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Toggle binary preferences on and off with immediate tactile feedback.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/switch`
- **Install (npm)**: `import { Switch } from "@biudev/ui/switch"`
- **Public Source**: https://ui.biu.dev/docs/source/switch
### Usage
```tsx
import { Switch } from "@/components/ui/biu/switch";
export function Example() {
return ;
}
```
### API Reference
#### SwitchProps
Inherits: `Omit,'type'|'size'|'role'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `ReactNode` | `—` | Visible text label or accessible name. |
| `description` | `ReactNode` | `—` | Secondary supporting description text. |
| `placement` | `'start'\|'end'` | `'start'` | Placement of the control relative to its label. |
| `size` | `'sm'\|'md'` | `'md'` | Size tier controlling height, padding, and typography. |
---
## Radio Group
- **URL**: https://ui.biu.dev/docs/components/radio-group
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Choose a single option from standard, segmented, or interactive card layouts.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/radio-group`
- **Install (npm)**: `import { RadioGroup } from "@biudev/ui/radio-group"`
- **Public Source**: https://ui.biu.dev/docs/source/radio-group
### Usage
```tsx
import { RadioGroup } from "@/components/ui/biu/radio-group";
export function Example() {
return (
);
}
```
### API Reference
#### RadioOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Controlled current value. |
| `label` (required) | `ReactNode` | `—` | Visible text label or accessible name. |
| `description` | `ReactNode` | `—` | Secondary supporting description text. |
| `hint` | `ReactNode` | `—` | Helper text or inline hint shown alongside the item or field. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
#### RadioGroupProps
Inherits: `Omit,'defaultValue'|'onChange'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `options` (required) | `readonly RadioOption[]` | `—` | Available selectable options. |
| `value` | `string` | `—` | Controlled current value. |
| `defaultValue` | `string` | `—` | Initial value used when operating in uncontrolled mode. |
| `onValueChange` | `(value:string)=>void` | `—` | Callback invoked when the selected value changes. |
| `name` | `string` | `—` | Form field name or display name. |
| `required` | `boolean` | `—` | Marks the field or selection as required. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `variant` | `'default'\|'card'\|'segmented-list'` | `'default'` | Visual style variant. |
| `direction` | `'vertical'\|'horizontal'` | `'vertical'` | Primary layout or sort direction. |
---
## Select
- **URL**: https://ui.biu.dev/docs/components/select
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Pick a value from a Base UI popover list with descriptions, icons, and full keyboard support.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/select`
- **Install (npm)**: `import { Select } from "@biudev/ui/select"`
- **Public Source**: https://ui.biu.dev/docs/source/select
### Usage
```tsx
import { useState } from "react";
import { Select } from "@/components/ui/biu/select";
export function Example() {
const [role, setRole] = useState("design");
return (
);
}
```
### API Reference
#### SelectOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Value emitted when this option is selected. |
| `label` (required) | `string` | `—` | Visible label displayed for the option. |
| `disabled` | `boolean` | `—` | Prevents the option from being focused or selected. |
| `description` | `ReactNode` | `—` | Secondary helper text shown below the option label. |
| `icon` | `ReactNode` | `—` | Leading icon displayed alongside the option label. |
| `hidden` | `boolean` | `—` | Excludes this option from the rendered options list. |
#### SelectProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | `—` | HTML id applied to the select trigger element. |
| `label` (required) | `ReactNode` | `—` | Visible field label associated with the select trigger. |
| `options` (required) | `readonly SelectOption[]` | `—` | List of selectable option definitions. |
| `value` (required) | `string \| null` | `—` | Controlled selected value, or null when cleared. |
| `onValueChange` (required) | `(value: string \| null) => void` | `—` | Callback invoked when the selected option changes. |
| `disabled` | `boolean` | `—` | Disables interaction with the select trigger. |
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Control height tier (sm, md, or lg). |
| `placeholder` | `string` | `'Select an option'` | Placeholder text shown when no option is selected. |
| `hint` | `ReactNode` | `—` | Supporting helper text displayed beneath the field. |
| `error` | `ReactNode` | `—` | Validation error message shown below the field. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `popupClassName` | `string` | `—` | Additional CSS class applied to the floating options popup. |
| `popupAlign` | `'start' \| 'center' \| 'end'` | `'center'` | Horizontal alignment of the options popup relative to the trigger. |
---
## Combobox
- **URL**: https://ui.biu.dev/docs/components/combobox
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Searchable single or multi-select autocomplete with async filtering and avatar badges.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/combobox`
- **Install (npm)**: `import { Combobox } from "@biudev/ui/combobox"`
- **Public Source**: https://ui.biu.dev/docs/source/combobox
### Usage
```tsx
import { useState } from "react";
import { Combobox } from "@/components/ui/biu/combobox";
export function Example() {
const [teams, setTeams] = useState(["design"]);
return (
);
}
```
### API Reference
#### ComboboxOption
Inherits: `TagInputOption`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `avatar` | `boolean \| string` | `—` | Avatar image URL, element, or initials. |
| `color` | `string` | `—` | Accent or swatch CSS color value. |
#### ComboboxProps
Inherits: `Omit`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `options` (required) | `readonly ComboboxOption[]` | `—` | Available selectable options. |
| `onChange` | `(value: string[], options: ComboboxOption[]) => void` | `—` | Callback invoked when the value changes. |
| `onCreate` | `(text: string) => ComboboxOption \| void` | `—` | Callback invoked when the user creates a new option. |
---
## Chip Group
- **URL**: https://ui.biu.dev/docs/components/chip-group
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Compact single or multi-select filter chips with icons and inline counts.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/chip-group`
- **Install (npm)**: `import { ChipGroup } from "@biudev/ui/chip-group"`
- **Public Source**: https://ui.biu.dev/docs/source/chip-group
### Usage
```tsx
import { ChipGroup } from "@/components/ui/biu/chip-group";
export function Example() {
return (
);
}
```
### API Reference
#### ChipOption
Inherits: `string`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string` | `—` | Controlled current value. |
| `label` | `string` | `—` | Visible text label or accessible name. |
| `icon` | `React.ReactNode` | `—` | Leading icon element. |
| `count` | `number` | `—` | Numeric badge count displayed on the item. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
#### ChipGroupProps
Inherits: `Omit,'onChange'|'defaultValue'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `options` (required) | `ChipOption[]` | `—` | Available selectable options. |
| `value` | `string[]` | `—` | Controlled current value. |
| `defaultValue` | `string[]` | `[]` | Initial value used when operating in uncontrolled mode. |
| `onValueChange` | `(value:string[])=>void` | `—` | Callback invoked when the selected value changes. |
| `multiple` | `boolean` | `false` | Allows selecting multiple options simultaneously. |
| `deselectable` | `boolean` | `true` | Allows clicking the active chip to clear selection. |
| `variant` | `'solid'\|'outline'\|'soft'` | `'solid'` | Visual style variant. |
| `size` | `'sm'\|'md'\|'lg'` | `'md'` | Size tier controlling height, padding, and typography. |
| `scrollable` | `boolean` | `false` | Enables horizontal scrolling when items exceed available width. |
| `showCheck` | `boolean` | `true` | Displays a checkmark icon inside selected chips. |
| `disabled` | `boolean` | `false` | Disables interaction and applies disabled styling. |
---
## Calendar
- **URL**: https://ui.biu.dev/docs/components/calendar
- **Category**: Forms & Inputs
- **Edition**: Open Source (MIT)
- **Summary**: Accessible date picker grid with min/max bounds, range support, and roving keyboard focus.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/calendar`
- **Install (npm)**: `import { Calendar } from "@biudev/ui/calendar"`
- **Public Source**: https://ui.biu.dev/docs/source/calendar
### Usage
```tsx
import { useState } from "react";
import { Calendar, type CalendarValue } from "@/components/ui/biu/calendar";
export function Example() {
const [date, setDate] = useState(null);
return ;
}
```
### API Reference
#### DateRange
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `start` (required) | `Date\|null` | `—` | Start date of the selected range. |
| `end` (required) | `Date\|null` | `—` | End date of the selected range. |
#### CalendarValue
Inherits: `Date & DateRange & Date[] & null`
`Date | DateRange | Date[] | null`
#### CalendarLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `today` (required) | `string` | `—` | Label for the Today jump button. |
| `goToToday` (required) | `string` | `—` | Accessible label for navigating back to the current month. |
| `previousMonth` (required) | `string` | `—` | Accessible label for stepping to the previous month. |
| `nextMonth` (required) | `string` | `—` | Accessible label for stepping to the next month. |
| `chooseMonth` (required) | `string` | `—` | Accessible label for opening the month picker. |
| `chooseYear` (required) | `string` | `—` | Accessible label for opening the year picker. |
| `backToDays` (required) | `string` | `—` | Accessible label for returning to the day grid view. |
| `todaySuffix` (required) | `string` | `—` | Screen-reader suffix appended to today’s date cell. |
| `hasEventsSuffix` (required) | `string` | `—` | Screen-reader suffix appended to dates with event markers. |
#### CalendarProps
Inherits: `Omit,'onChange'|'defaultValue'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | `'single'\|'range'\|'multiple'` | `'single'` | Interaction or selection mode. |
| `value` | `CalendarValue` | `—` | Controlled current value. |
| `defaultValue` | `CalendarValue` | `null` | Initial value used when operating in uncontrolled mode. |
| `onChange` | `(value:CalendarValue)=>void` | `—` | Callback invoked when the value changes. |
| `month` | `Date` | `—` | Controlled visible month date. |
| `defaultMonth` | `Date` | `—` | Initial visible month when uncontrolled. |
| `onMonthChange` | `(month:Date)=>void` | `—` | Callback invoked when the displayed month changes. |
| `weekStartsOn` | `0\|1` | `0` | First day of the week (0 = Sunday through 6 = Saturday). |
| `locale` | `string` | `—` | BCP 47 locale tag used for localized formatting and sorting. |
| `labels` | `Partial` | `—` | Localized UI string overrides for built-in labels and ARIA text. |
| `minDate` | `Date` | `—` | Earliest selectable date. |
| `maxDate` | `Date` | `—` | Latest selectable date. |
| `isDateDisabled` | `(date:Date)=>boolean` | `—` | In range mode, disabled dates cannot be endpoints and can occur between them. |
| `markedDates` | `Record` | `{}` | Dates that display an activity dot marker. |
| `variant` | `'tiles'\|'minimal'` | `'tiles'` | Visual style variant. |
| `showTodayButton` | `boolean` | `true` | Shows a quick button to jump back to today. |
| `showOutsideDays` | `boolean` | `false` | Displays leading and trailing days from adjacent months. |
| `fixedWeeks` | `boolean` | `false` | Always renders 6 calendar rows to prevent height shifts. |
---
## Stepper Form
- **URL**: https://ui.biu.dev/docs/components/stepper-form
- **Category**: Forms & Inputs
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Multi-step onboarding and questionnaire flow with height-morphing transitions, inline validation, keyboard shortcuts, and async completion.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/stepper-form` (Pro license required)
### Usage
```tsx
"use client";
import { StepperChoices, StepperField, StepperForm, StepperInput } from "@/components/ui/biu/stepper-form";
export const Example = () => (
(!v.name.trim() ? { name: "Required." } : undefined),
render: ({ values, setValues }) => (
setValues({ ...values, name: e.target.value })}
/>
),
},
{
id: "plan",
title: "Plan",
render: ({ values, setValues }) => (
setValues({ ...values, plan })}
options={[
{ value: "free", title: "Free" },
{ value: "pro", title: "Pro" },
]}
/>
),
},
]}
/>
);
```
### API Reference
#### StepErrors
Inherits: `Record`
`Record`
#### StepperStepContext
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `values` (required) | `V` | `—` | Current form values object shared across steps. |
| `setValues` (required) | `React.Dispatch>` | `—` | State setter updating the shared form values. |
| `errors` (required) | `StepErrors` | `—` | Validation errors keyed by field name for the active step. |
| `goTo` (required) | `(stepIndex: number) => void` | `—` | Jumps directly to a specific step index. |
| `next` (required) | `() => void` | `—` | Validates and advances to the next step. |
| `back` (required) | `() => void` | `—` | Navigates to the previous step. |
#### StepperStep
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `title` (required) | `string` | `—` | Primary heading or title text. |
| `heading` | `string` | `—` | Heading displayed at the top of the step or section. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `optional` | `boolean` | `—` | Displays an optional badge next to the field label. |
| `disabled` | `boolean \| ((values: V) => boolean)` | `—` | Conditionally omit a step from progress and navigation based on current values. |
| `render` (required) | `(ctx: StepperStepContext) => ReactNode` | `—` | Render function producing the step body content. |
| `validate` | `(values: V) => StepErrors \| null \| undefined` | `—` | Validation function returning a map of field errors for the step. |
#### StepperFormVariant
Inherits: `'clean' & 'tray'`
`'clean' | 'tray'`
#### StepperFormLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `progressAriaLabel` (required) | `string` | `—` | Accessible label for the step progress indicator. |
| `back` (required) | `string` | `—` | Navigates to the previous step. |
| `skip` (required) | `string` | `—` | Label for skipping an optional step. |
| `continue` (required) | `string` | `—` | Label for advancing to the next step. |
| `submit` (required) | `string` | `—` | Label for submitting the final step. |
| `submitting` (required) | `string` | `—` | Indicates an asynchronous submission is in progress. |
| `optional` (required) | `string` | `—` | Displays an optional badge next to the field label. |
| `edit` (required) | `string` | `—` | Label for the Edit jump-back button in a review row. |
| `stepOf` (required) | `(current: number, total: number) => string` | `—` | Formatter rendering the Step X of Y counter. |
| `stepAnnouncement` (required) | `(current: number, total: number, title: string) => string` | `—` | Formatter for screen-reader step change announcements. |
| `removeTag` (required) | `(tag: string) => string` | `—` | Accessible label formatter for removing a stepper tag. |
#### StepperFormProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `steps` (required) | `StepperStep[]` | `—` | Ordered step definitions. |
| `initialValues` (required) | `V` | `—` | Initial shared form values preserved across Back and Edit navigation. |
| `variant` | `StepperFormVariant` | `'clean'` | Visual container style: `'clean'` (unified card with top progress bars) or `'tray'` (two-layer tray + inset card). |
| `onComplete` | `(values: V) => void \| Promise` | `—` | Called on final step submission. Returning a Promise activates the async submitting state. |
| `initialStep` | `number` | `0` | Initial active step index (0-based). Defaults to `0`. |
| `step` | `number` | `—` | Controlled active step index (0-based). |
| `onStepChange` | `(step: number) => void` | `—` | Called when the active step index changes. |
| `submitLabel` | `string` | `—` | Primary button label on the final step. Overrides `labels.submit`. |
| `submittingLabel` | `string` | `—` | Primary button label while an async `onComplete` Promise is pending. Overrides `labels.submitting`. |
| `success` | `(values: V, reset: () => void) => ReactNode` | `—` | Custom completion view rendered after `onComplete` succeeds. Receives `(values, reset)`. |
| `labels` | `Partial` | `—` | Override UI copy for any language or i18n library. |
#### StepperFieldProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` (required) | `string` | `—` | Form field name or display name. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `hint` | `string` | `—` | Helper text or inline hint shown alongside the item or field. |
| `optional` | `boolean` | `—` | Displays an optional badge next to the field label. |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
#### StepperInputProps
Inherits: `ComponentPropsWithRef<'input'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `prefix` | `string` | `—` | Leading static affix rendered inside the input box. |
#### StepperTagsProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | `—` | Unique identifier for this element or item. |
| `value` (required) | `string[]` | `—` | Controlled current value. |
| `onChange` (required) | `(next: string[]) => void` | `—` | Callback invoked when the value changes. |
| `validate` | `(item: string) => string \| boolean` | `—` | Validation function returning a map of field errors for the step. |
| `max` | `number` | `10` | Maximum allowed count, capacity, or character limit. |
| `placeholder` | `string` | `'Type and press Enter…'` | Placeholder text displayed when the input is empty. |
| `'aria-invalid'` | `boolean` | `—` | Indicates the field value failed validation. |
| `'aria-describedby'` | `string` | `—` | ID of the element that describes this component. |
#### StepperChoiceOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Controlled current value. |
| `title` (required) | `string` | `—` | Primary heading or title text. |
| `aside` | `string` | `—` | Optional side content rendered alongside the stepper form. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `badge` | `string` | `—` | Optional badge value or count displayed beside the label. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
#### StepperChoicesProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string \| string[]` | `—` | Single selected value, or array when `multiple` is `true`. |
| `onChange` (required) | `(value: any) => void` | `—` | Callback invoked when the value changes. |
| `options` (required) | `StepperChoiceOption[]` | `—` | Available selectable options. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `layout` | `'cards' \| 'list'` | `'cards'` | `'cards'` (AffectUI gliding horizontal grid) or `'list'` (shadcn Questionnaire stacked rows). Defaults to `'cards'`. |
| `multiple` | `boolean` | `false` | Allow multi-select checkboxes (shadcn Questionnaire style). Defaults to `false`. |
| `shortcuts` | `'letters' \| 'numbers'` | `—` | Optional shortcuts while an option has focus (`'letters'` -> A/B/C, `'numbers'` -> 1/2/3). |
#### StepperReviewRow
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `value` (required) | `ReactNode` | `—` | Controlled current value. |
| `secondary` | `ReactNode` | `—` | Secondary action button or link rendered in the footer. |
| `step` | `number \| string` | `—` | Zero-based step index or step ID to jump back to when Edit is clicked. |
#### StepperReviewProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `rows` (required) | `StepperReviewRow[]` | `—` | Ordered list of summary rows to display. |
| `onEdit` | `(step: number \| string) => void` | `—` | Custom handler invoked when clicking Edit on a review row. |
#### StepperSuccessProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` (required) | `string` | `—` | Primary heading or title text. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `action` | `ReactNode` | `—` | Trailing action control rendered in the header or card. |
---
## Dialog
- **URL**: https://ui.biu.dev/docs/components/dialog
- **Category**: Overlays & Menus
- **Edition**: Open Source (MIT)
- **Summary**: Focused modal and alert dialogs with async confirmation states and automatic focus restoration.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/dialog`
- **Install (npm)**: `import { Dialog } from "@biudev/ui/dialog"`
- **Public Source**: https://ui.biu.dev/docs/source/dialog
### Usage
```tsx
import { Button } from "@/components/ui/biu/button";
import { Dialog } from "@/components/ui/biu/dialog";
export function Example() {
return (
);
}
```
### API Reference
#### DialogProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `trigger` | `ReactElement` | `—` | Interactive element that toggles or opens the overlay. |
| `title` (required) | `ReactNode` | `—` | Primary heading or title text. |
| `description` | `ReactNode` | `—` | Secondary supporting description text. |
| `children` | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `open` | `boolean` | `—` | Controlled open visibility state. |
| `defaultOpen` | `boolean` | `—` | Initial open state when uncontrolled. |
| `onOpenChange` | `(open:boolean)=>void` | `—` | Callback invoked when the open state toggles. |
| `closeLabel` | `string` | `'Close'` | Accessible label for the close button. |
| `size` | `'compact'\|'medium'\|'wide'` | `'compact'` | Size tier controlling height, padding, and typography. |
| `headerIcon` | `ReactNode` | `—` | Icon displayed inside the dialog or drawer header. |
| `headerActions` | `ReactNode` | `—` | Extra action buttons rendered in the header. |
| `footer` | `ReactNode` | `—` | Optional footer content rendered at the bottom. |
| `contained` | `boolean` | `false` | Constrains overlay positioning within its parent container. |
| `initialFocus` | `RefObject` | `—` | Element or ref focused when the dialog opens. |
| `finalFocus` | `RefObject\|(()=>HTMLElement\|null)` | `—` | Element or ref that receives focus when the dialog closes. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
#### AlertDialogProps
Inherits: `Pick`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `cancelLabel` | `string` | `'Cancel'` | Label for the alert dialog cancel button. |
| `confirmLabel` | `string` | `'Confirm'` | Label for the alert dialog confirm button. |
| `danger` | `boolean` | `false` | Styles the action as destructive/dangerous. |
| `onConfirm` | `()=>void\|Promise` | `—` | Callback invoked when the user confirms the alert dialog. |
| `onCancel` | `()=>void` | `—` | Callback invoked when the user cancels the alert dialog. |
| `onConfirmError` | `(error:unknown)=>void` | `—` | Callback invoked if an async onConfirm handler throws. |
| `errorMessage` | `string` | `'Could not complete. Please try again.'` | Fallback error message shown when an async confirmation rejects. |
---
## Drawer
- **URL**: https://ui.biu.dev/docs/components/drawer
- **Category**: Overlays & Menus
- **Edition**: Open Source (MIT)
- **Summary**: Side sheet and bottom drawer for inspectors, forms, and responsive mobile navigation.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/drawer`
- **Install (npm)**: `import { Drawer } from "@biudev/ui/drawer"`
- **Public Source**: https://ui.biu.dev/docs/source/drawer
### Usage
```tsx
"use client";
import { useState } from "react";
import { Drawer } from "@/components/ui/biu/drawer";
export function Example() {
const [open, setOpen] = useState(false);
return (
<>
Monthly MRR: $2,400
>
);
}
```
### API Reference
#### DrawerSide
Inherits: `'right' & 'left' & 'bottom' & 'top'`
`'right' | 'left' | 'bottom' | 'top'`
#### DrawerSize
Inherits: `'sm' & 'md' & 'lg' & 'full'`
`'sm' | 'md' | 'lg' | 'full'`
#### DrawerVariant
Inherits: `'flush' & 'floating'`
`'flush' | 'floating'`
#### DrawerProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `open` | `boolean` | `—` | Controlled open visibility state. |
| `defaultOpen` | `boolean` | `false` | Initial open state when uncontrolled. |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `trigger` | `React.ReactElement` | `—` | Interactive element that toggles or opens the overlay. |
| `title` (required) | `React.ReactNode` | `—` | Primary heading or title text. |
| `description` | `React.ReactNode` | `—` | Secondary supporting description text. |
| `headerIcon` | `React.ReactNode` | `—` | Icon displayed inside the dialog or drawer header. |
| `headerActions` | `React.ReactNode` | `—` | Extra action buttons rendered in the header. |
| `footer` | `React.ReactNode` | `—` | Optional footer content rendered at the bottom. |
| `side` | `DrawerSide` | `'right'` | Preferred edge where the floating popup anchors. |
| `size` | `DrawerSize` | `'md'` | Size tier controlling height, padding, and typography. |
| `variant` | `DrawerVariant` | `'flush'` | 'flush' docks to viewport edge; 'floating' adds BeUI-style inset margin & rounded corners. |
| `modal` | `boolean` | `true` | Set false for non-blocking side inspectors where the background remains interactive. |
| `closeLabel` | `string` | `'Close drawer'` | Accessible label for the close button. |
| `container` | `HTMLElement \| null` | `—` | DOM element or ref used as the portal container. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `children` | `React.ReactNode` | `—` | Nested React content rendered inside the component. |
#### SheetProps
Inherits: `DrawerProps`
`DrawerProps`
---
## Popover
- **URL**: https://ui.biu.dev/docs/components/popover
- **Category**: Overlays & Menus
- **Edition**: Open Source (MIT)
- **Summary**: Contextual floating surfaces anchored to any trigger element with collision flipping.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/popover`
- **Install (npm)**: `import { Popover } from "@biudev/ui/popover"`
- **Public Source**: https://ui.biu.dev/docs/source/popover
### Usage
```tsx
import { Button } from "@/components/ui/biu/button";
import { Popover } from "@/components/ui/biu/popover";
export function Example() {
return (
Details} title="Project details">
Your project is up to date.
);
}
```
### API Reference
#### PopoverProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `trigger` (required) | `ReactElement` | `—` | Interactive element that toggles or opens the overlay. |
| `title` (required) | `ReactNode` | `—` | Primary heading or title text. |
| `description` | `ReactNode` | `—` | Secondary supporting description text. |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `open` | `boolean` | `—` | Controlled open visibility state. |
| `defaultOpen` | `boolean` | `—` | Initial open state when uncontrolled. |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `side` | `'top' \| 'right' \| 'bottom' \| 'left'` | `'bottom'` | Preferred edge where the floating popup anchors. |
| `align` | `'start' \| 'center' \| 'end'` | `'center'` | Alignment relative to the anchor or column cells. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Hover Card
- **URL**: https://ui.biu.dev/docs/components/hover-card
- **Category**: Overlays & Menus
- **Edition**: Open Source (MIT)
- **Summary**: Rich preview cards on hover or keyboard focus with safe pointer corridors and edge flipping.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/hover-card`
- **Install (npm)**: `import { HoverCard } from "@biudev/ui/hover-card"`
- **Public Source**: https://ui.biu.dev/docs/source/hover-card
### Usage
```tsx
"use client";
import { HoverCard } from "@/components/ui/biu/hover-card";
export function Example() {
return (
Scout
Research agent · 41 runs this week
}
>
Scout
);
}
```
### API Reference
#### HoverCardSide
Inherits: `'bottom' & 'top' & 'right' & 'left'`
`'bottom' | 'top' | 'right' | 'left'`
#### HoverCardAlign
Inherits: `'start' & 'center' & 'end'`
`'start' | 'center' | 'end'`
#### HoverCardProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `content` (required) | `ReactNode` | `—` | Rich preview content rendered inside the floating card. |
| `children` (required) | `ReactElement` | `—` | Single interactive trigger element (usually an `` or `}>More information;
}
```
### API Reference
#### TooltipProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `trigger` (required) | `ReactElement` | `—` | Interactive element that toggles or opens the overlay. |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `shortcut` | `ReactNode` | `—` | Keyboard shortcut hint displayed alongside the item. |
| `side` | `'top' \| 'right' \| 'bottom' \| 'left'` | `'top'` | Preferred edge where the floating popup anchors. |
| `align` | `'start' \| 'center' \| 'end'` | `'center'` | Alignment relative to the anchor or column cells. |
| `delay` | `number` | `400` | Hover delay in milliseconds before the tooltip opens. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Dropdown Menu
- **URL**: https://ui.biu.dev/docs/components/dropdown-menu
- **Category**: Overlays & Menus
- **Edition**: Open Source (MIT)
- **Summary**: Action menus with nested submenus, keyboard shortcuts, and radio or checkbox items.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/dropdown-menu`
- **Install (npm)**: `import { DropdownMenu } from "@biudev/ui/dropdown-menu"`
- **Public Source**: https://ui.biu.dev/docs/source/dropdown-menu
### Usage
```tsx
import { useState } from "react";
import { Button } from "@/components/ui/biu/button";
import { DropdownMenu } from "@/components/ui/biu/dropdown-menu";
export function Example() {
const [action, setAction] = useState("");
return (
Actions}
items={[
{ label: "Edit", onSelect: () => setAction("Edit") },
{ label: "Archive", onSelect: () => setAction("Archive") },
]}
/>
{action}
);
}
```
### API Reference
#### DropdownMenuItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
| `shortcut` | `string` | `—` | Keyboard shortcut hint displayed alongside the item. |
| `section` | `string` | `—` | Group heading used to categorize dropdown menu items. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `danger` | `boolean` | `—` | Styles the action as destructive/dangerous. |
| `divider` | `boolean` | `—` | Renders a divider line separating menu sections. |
| `checked` | `boolean` | `—` | Whether this menu item or control is currently checked. |
| `type` | `'radio'\|'checkbox'` | `—` | Menu item or input control type. |
| `keepOpen` | `boolean` | `—` | Keeps the dropdown menu open after activating this item. |
| `submenu` | `DropdownMenuItem[]` | `—` | Nested items rendered inside a cascading submenu. |
| `onSelect` | `()=>void` | `—` | Callback invoked when the item is selected. |
#### DropdownMenuProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `trigger` (required) | `ReactElement` | `—` | Interactive element that toggles or opens the overlay. |
| `items` (required) | `DropdownMenuItem[]` | `—` | Ordered list of items rendered by the component. |
| `title` | `string` | `—` | Primary heading or title text. |
| `header` | `ReactNode` | `—` | Header label or custom header element. |
| `open` | `boolean` | `—` | Controlled open visibility state. |
| `defaultOpen` | `boolean` | `—` | Initial open state when uncontrolled. |
| `onOpenChange` | `(open:boolean)=>void` | `—` | Callback invoked when the open state toggles. |
| `align` | `'start'\|'end'` | `'start'` | Alignment relative to the anchor or column cells. |
| `side` | `'top'\|'bottom'` | `'bottom'` | Preferred edge where the floating popup anchors. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Context Menu
- **URL**: https://ui.biu.dev/docs/components/context-menu
- **Category**: Overlays & Menus
- **Edition**: Open Source (MIT)
- **Summary**: Right-click contextual action menu with submenus, checkboxes, danger items, and shortcuts.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/context-menu`
- **Install (npm)**: `import { ContextMenu } from "@biudev/ui/context-menu"`
- **Public Source**: https://ui.biu.dev/docs/source/context-menu
### Usage
```tsx
"use client";
import { ContextMenu } from "@/components/ui/biu/context-menu";
export function Example() {
return (
Right-click here or focus this area and press Shift+F10.
);
}
```
### API Reference
#### ContextMenuItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `'separator' \| 'section' \| 'item' \| 'checkbox' \| 'radio' \| 'submenu'` | `—` | Menu item or input control type. |
| `label` | `string` | `—` | Visible text label or accessible name. |
| `icon` | `React.ReactNode` | `—` | Leading icon element. |
| `shortcut` | `string` | `—` | Keyboard shortcut hint displayed alongside the item. |
| `description` | `string` | `—` | Secondary supporting description text. |
| `checked` | `boolean` | `—` | Whether this menu item or control is currently checked. |
| `danger` | `boolean` | `—` | Styles the action as destructive/dangerous. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `onSelect` | `() => void` | `—` | Callback invoked when the item is selected. |
| `items` | `ContextMenuItem[]` | `—` | Ordered list of items rendered by the component. |
#### ContextMenuProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` (required) | `ContextMenuItem[]` | `—` | Ordered list of items rendered by the component. |
| `children` (required) | `React.ReactNode` | `—` | Nested React content rendered inside the component. |
| `onOpenChange` | `(open: boolean) => void` | `—` | Callback invoked when the open state toggles. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
---
## Filter Menu
- **URL**: https://ui.biu.dev/docs/components/filter-menu
- **Category**: Overlays & Menus
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Multi-facet filtering popover with active chips and operator menus for tables and lists.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/filter-menu` (Pro license required)
### Usage
```tsx
import { useState } from "react";
import { FilterMenu, type FilterValue } from "@/components/ui/biu/filter-menu";
export function Example() {
const [value, setValue] = useState({});
return (
);
}
```
### API Reference
#### FilterGroup
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `chipPrefix` | `string` | `—` | Optional prefix shown before selected filter chip labels. |
| `options` (required) | `{id:string;label:string}[]` | `—` | Available selectable options. |
#### FilterValue
Inherits: `Record`
`Record`
#### FilterMenuProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `groups` (required) | `FilterGroup[]` | `—` | Grouped collections of options or navigation items. |
| `value` | `FilterValue` | `—` | Controlled current value. |
| `defaultValue` | `FilterValue` | `{}` | Initial value used when operating in uncontrolled mode. |
| `onChange` | `(value:FilterValue)=>void` | `—` | Callback invoked when the value changes. |
| `defaultOpen` | `string[]` | `—` | Initial open state when uncontrolled. |
| `title` | `string` | `'Filters'` | Primary heading or title text. |
| `clearLabel` | `string` | `'Clear all'` | Label for the clear-all filters button. |
| `removeLabel` | `(label:string)=>string` | `label=>`Remove ${label}`` | Accessible label for removing a chip or attachment. |
| `hints` | `boolean` | `true` | Shows keyboard navigation hints in the filter menu footer. |
| `hintNavigate` | `string` | `'to navigate'` | Footer hint text explaining arrow-key navigation. |
| `hintSelect` | `string` | `'to select'` | Footer hint text explaining selection activation. |
| `filterLabel` | `(count:number)=>string` | `count=>`${count} ${count===1?'filter':'filters'}`` | Accessible label for the filter menu. |
| `chipOverflow` | `'collapse'\|'wrap'` | `'collapse'` | Controls whether selected chips truncate in one row or wrap. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
---
## Tabs
- **URL**: https://ui.biu.dev/docs/components/tabs
- **Category**: Navigation
- **Edition**: Open Source (MIT)
- **Summary**: Organize views into underline, tray, or button-bar tab panels with sliding indicators.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/tabs`
- **Install (npm)**: `import { Tabs } from "@biudev/ui/tabs"`
- **Public Source**: https://ui.biu.dev/docs/source/tabs
### Usage
```tsx
import { Tabs } from "@/components/ui/biu/tabs";
export function Example() {
return (
Project overview
},
{ value: "activity", label: "Activity", content: Recent activity
},
]}
/>
);
}
```
### API Reference
#### TabsItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Controlled current value. |
| `label` (required) | `ReactNode` | `—` | Visible text label or accessible name. |
| `content` (required) | `ReactNode` | `—` | Rendered content for the tab panel, section, or item. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
| `count` | `number\|string` | `—` | Numeric badge count displayed on the item. |
| `badge` | `ReactNode` | `—` | Optional badge value or count displayed beside the label. |
| `ariaLabel` | `string` | `—` | Accessible label when no visible text label is present. |
#### TabsProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` (required) | `TabsItem[]` | `—` | Ordered list of items rendered by the component. |
| `value` | `string` | `—` | Controlled current value. |
| `defaultValue` | `string` | `—` | Initial value used when operating in uncontrolled mode. |
| `onValueChange` | `(value:string)=>void` | `—` | Callback invoked when the selected value changes. |
| `variant` | `'buttons'\|'tray'\|'underline'` | `'buttons'` | Visual style variant. |
| `icons` | `'always'\|'selected'` | `'always'` | Controls whether tab icons show always or only on the active tab. |
| `scrollButtons` | `boolean` | `false` | Displays left/right arrow buttons when tabs overflow horizontally. |
| `scrollLeftLabel` | `string` | `'Scroll tabs left'` | Accessible label for the scroll-tabs-left button. |
| `scrollRightLabel` | `string` | `'Scroll tabs right'` | Accessible label for the scroll-tabs-right button. |
| `fullWidth` | `boolean` | `false` | Stretches the control to fill 100% of its container width. |
| `size` | `'sm'\|'md'\|'lg'` | `'md'` | Size tier controlling height, padding, and typography. |
| `'aria-label'` | `string` | `—` | Accessible label for assistive technologies. |
| `'aria-labelledby'` | `string` | `—` | ID of the element that labels this component. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
---
## Breadcrumb
- **URL**: https://ui.biu.dev/docs/components/breadcrumb
- **Category**: Navigation
- **Edition**: Open Source (MIT)
- **Summary**: Hierarchical path navigation with auto-collapse ellipsis and custom separators.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/breadcrumb`
- **Install (npm)**: `import { Breadcrumb } from "@biudev/ui/breadcrumb"`
- **Public Source**: https://ui.biu.dev/docs/source/breadcrumb
### Usage
```tsx
import { Breadcrumb } from "@/components/ui/biu/breadcrumb";
export function Example() {
return (
);
}
```
### API Reference
#### BreadcrumbItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `React.ReactNode` | `—` | Visible text label or accessible name. |
| `title` | `string` | `—` | Plain text fallback used for hover title when label is truncated or custom JSX. |
| `href` | `string` | `—` | Navigation target URL. |
| `icon` | `React.ReactNode` | `—` | Leading icon element. |
| `onClick` | `(event: React.MouseEvent) => void` | `—` | Click event handler for this item. |
| `current` | `boolean` | `—` | Marks the breadcrumb item as the current page, or current 1-based branch index. |
#### BreadcrumbVariant
Inherits: `'default' & 'pill' & 'bar'`
`'default' | 'pill' | 'bar'`
#### BreadcrumbProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` (required) | `BreadcrumbItem[]` | `—` | Ordered list of items rendered by the component. |
| `separator` | `React.ReactNode` | `—` | Custom separator element placed between breadcrumb items. |
| `maxItems` | `number` | `—` | Maximum visible items before folding middle ancestors behind an ellipsis. |
| `collapseBehavior` | `'menu' \| 'expand'` | `'menu'` | 'menu' opens a popover of hidden ancestors (BeUI/AffectUI style); 'expand' unfolds inline. |
| `variant` | `BreadcrumbVariant` | `'default'` | Visual style variant. |
| `maxItemWidth` | `number` | `180` | Max pixel width per segment before truncating with ellipsis (defaults to 180). |
| `expandLabel` | `string` | `'Show hidden path segments'` | Accessible label for expanding the sidebar or panel. |
---
## Pagination
- **URL**: https://ui.biu.dev/docs/components/pagination
- **Category**: Navigation
- **Edition**: Open Source (MIT)
- **Summary**: Navigate paged datasets with compact, numbered, and page-size controls.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/pagination`
- **Install (npm)**: `import { Pagination } from "@biudev/ui/pagination"`
- **Public Source**: https://ui.biu.dev/docs/source/pagination
### Usage
```tsx
import { useState } from "react";
import { Pagination } from "@/components/ui/biu/pagination";
export function Example() {
const [page, setPage] = useState(1);
return ;
}
```
### API Reference
#### PaginationLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `navigation` (required) | `string` | `—` | Accessible nav landmark label for pagination. |
| `rowsPerPage` (required) | `string` | `—` | Label displayed before the rows-per-page selector. |
| `previousPage` (required) | `string` | `—` | Accessible label for the previous page button. |
| `nextPage` (required) | `string` | `—` | Accessible label for the next page button. |
| `page` (required) | `(page: number) => string` | `—` | Current 1-based page number. |
| `pageOf` (required) | `(current: string, count: string) => string` | `—` | Formatter rendering the current page of total pages indicator. |
| `range` (required) | `(start: string, end: string, total: string) => string` | `—` | Formatter rendering the visible item range summary. |
| `emptyRange` (required) | `string` | `—` | Text rendered for the item range when total is zero. |
#### PaginationProps
Inherits: `Omit, 'onChange'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `page` (required) | `number` | `—` | Current 1-based page number. |
| `onPageChange` (required) | `(page: number) => void` | `—` | Callback invoked when the active page changes. |
| `total` | `number` | `—` | Total number of items across all pages or branches. |
| `pageSize` | `number` | `20` | Number of rows displayed per page. |
| `pageCount` | `number` | `—` | Explicit total page count when not derived from total/pageSize. |
| `pageSizes` | `number[]` | `—` | Selectable page-size options shown in the pagination control. |
| `onPageSizeChange` | `(size: number) => void` | `—` | Callback invoked when the page size changes. |
| `siblings` | `number` | `1` | Number of sibling page buttons shown around the current page. |
| `compact` | `boolean` | `false` | Renders a condensed layout for tight spaces. |
| `disabled` | `boolean` | `false` | Disables interaction and applies disabled styling. |
| `locale` | `string` | `'en-US'` | BCP 47 locale tag used for localized formatting and sorting. |
| `labels` | `Partial` | `—` | Localized UI string overrides for built-in labels and ARIA text. |
---
## Sidebar
- **URL**: https://ui.biu.dev/docs/components/sidebar
- **Category**: Navigation
- **Edition**: Open Source (MIT)
- **Summary**: Collapsible workspace sidebar with icon rail, collapsible sections, and sliding active highlight.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/sidebar`
- **Install (npm)**: `import { Sidebar } from "@biudev/ui/sidebar"`
- **Public Source**: https://ui.biu.dev/docs/source/sidebar
### Usage
```tsx
"use client";
import { useState } from "react";
import { Sidebar } from "@/components/ui/biu/sidebar";
export function Example() {
const [active, setActive] = useState("customers");
return (
);
}
```
### API Reference
#### SidebarItemStatus
Inherits: `'online' & 'busy' & 'away' & 'offline'`
`'online' | 'busy' | 'away' | 'offline'`
#### SidebarSubItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique sub-item identifier. |
| `label` (required) | `string` | `—` | Visible link or button label. |
| `href` | `string` | `—` | Optional anchor destination. |
| `badge` | `React.ReactNode` | `—` | Optional trailing counter or tag badge. |
| `disabled` | `boolean` | `—` | Disables interaction when `true`. |
| `onSelect` | `() => void` | `—` | Fired when this sub-item is selected. |
#### SidebarItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique navigation item identifier. |
| `label` (required) | `string` | `—` | Visible navigation label. |
| `icon` | `React.ReactNode` | `—` | Optional leading 16px icon. |
| `href` | `string` | `—` | Optional anchor destination (ignored when nested `children` are present). |
| `badge` | `React.ReactNode` | `—` | Optional trailing counter or status badge. |
| `shortcut` | `string` | `—` | Optional trailing keyboard shortcut hint (e.g. `'G I'`). |
| `status` | `SidebarItemStatus` | `—` | Optional live presence dot (e.g. for agents or teammates). |
| `dotColor` | `string` | `—` | Optional custom project/category dot color (e.g. `'#3b82f6'`). |
| `action` | `React.ReactNode` | `—` | Optional trailing action slot revealed smoothly on row hover/focus. |
| `disabled` | `boolean` | `—` | Disables interaction when `true`. |
| `onSelect` | `() => void` | `—` | Fired when this item is selected. |
| `children` | `SidebarSubItem[]` | `—` | Optional nested sub-navigation links with smooth tree expand/collapse. |
| `defaultOpen` | `boolean` | `—` | Initial expanded state for nested children. |
#### SidebarGroup
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique group identifier. |
| `label` | `string` | `—` | Optional uppercase section heading. |
| `badge` | `React.ReactNode` | `—` | Optional compact counter displayed beside the group heading. |
| `action` | `React.ReactNode` | `—` | Optional trailing action button rendered in the group heading row (e.g. a `+` button). |
| `collapsible` | `boolean` | `—` | Enables collapsible section toggle when `true`. |
| `defaultOpen` | `boolean` | `—` | Initial expanded state when `collapsible` is `true`. Defaults to `true`. |
| `items` (required) | `SidebarItem[]` | `—` | Navigation items belonging to this group. |
#### SidebarSearchConfig
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | `'filter' \| 'trigger'` | `—` | `'filter'` filters sidebar items inline (default); `'trigger'` renders a command-palette trigger button. |
| `placeholder` | `string` | `—` | Input or trigger placeholder text. Defaults to `'Search…'`. |
| `shortcut` | `string` | `—` | Optional keyboard hint keycap displayed in `'trigger'` mode (e.g. `'⌘K'`). |
| `value` | `string` | `—` | Controlled search query in `'filter'` mode. |
| `onValueChange` | `(value: string) => void` | `—` | Fired when the inline filter query changes. |
| `onTrigger` | `() => void` | `—` | Fired when clicking the search button in `'trigger'` mode. |
| `label` | `string` | `—` | Accessible label for the search field or button. |
#### SidebarRailItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique primary rail section identifier. |
| `label` (required) | `string` | `—` | Short label rendered below the rail icon. |
| `icon` (required) | `React.ReactNode` | `—` | Primary rail icon. |
| `badge` | `number \| string` | `—` | Optional numeric or short notification badge on the rail icon. |
| `onSelect` | `() => void` | `—` | Fired when this rail section is clicked. |
#### SidebarRailConfig
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand` | `React.ReactNode` | `—` | Optional workspace mark or avatar rendered at the top of the primary rail. |
| `items` (required) | `readonly SidebarRailItem[]` | `—` | Vertical section switches rendered in the primary icon rail. |
| `activeId` | `string` | `—` | Controlled active rail section id. |
| `defaultActiveId` | `string` | `—` | Uncontrolled initial active rail section id. |
| `onSelect` | `(id: string) => void` | `—` | Fired when switching rail sections. |
| `footer` | `React.ReactNode` | `—` | Optional footer slot pinned to the bottom of the primary rail. |
| `width` | `number` | `—` | Width of the primary rail in pixels. Defaults to `52`. |
| `'aria-label'` | `string` | `—` | Accessible label for the primary rail navigation landmark. |
#### SidebarWorkspaceOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique workspace identifier. |
| `name` (required) | `string` | `—` | Display name shown in the header and switcher menu. |
| `plan` | `string` | `—` | Optional plan or member count subtitle (e.g. `'Pro · 12 members'`). |
| `monogram` | `string` | `—` | Optional single-letter monogram override inside the workspace mark. |
| `icon` | `React.ReactNode` | `—` | Optional custom icon element rendered inside the workspace mark. |
#### SidebarWorkspaceConfig
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` (required) | `string` | `—` | Active workspace display name. |
| `monogram` | `string` | `—` | Optional monogram letter override inside the brand mark. |
| `icon` | `React.ReactNode` | `—` | Optional custom logo element rendered inside the brand mark. |
| `plan` | `string` | `—` | Optional workspace plan label. |
| `options` | `readonly SidebarWorkspaceOption[]` | `—` | Switchable workspaces displayed in a floating dropdown menu. |
| `activeId` | `string` | `—` | Controlled active workspace id. |
| `defaultActiveId` | `string` | `—` | Uncontrolled initial active workspace id. |
| `onSelect` | `(id: string) => void` | `—` | Fired when switching to another workspace option. |
| `menuItems` | `DropdownMenuItem[]` | `—` | Extra menu actions appended below workspace options (e.g. Settings, Create workspace). |
#### SidebarAccountConfig
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` (required) | `string` | `—` | Signed-in user name shown in the footer button and floating menu header. |
| `email` | `string` | `—` | Optional email or role caption shown inside the floating account menu. |
| `avatar` | `string` | `—` | Optional avatar image URL. |
| `color` | `string` | `—` | Optional avatar accent color. |
| `status` | `SidebarItemStatus` | `—` | Optional live presence indicator on the avatar. |
| `badge` | `string` | `—` | Optional plan or role badge shown in the floating menu header (e.g. `'Pro'`). |
| `header` | `React.ReactNode` | `—` | Optional custom header rendered at the top of the floating account dropdown. |
| `menuItems` | `DropdownMenuItem[]` | `—` | Interactive items rendered inside the floating account dropdown menu. |
#### SidebarPromoItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique promo card identifier. |
| `eyebrow` (required) | `string` | `—` | Compact eyebrow label (e.g. `'NEW'`, `'CHANGELOG'`). |
| `title` (required) | `string` | `—` | Headline displayed in the promo card. |
| `linkLabel` | `string` | `—` | Optional action link label (e.g. `'Read notes'`). |
| `onAction` | `() => void` | `—` | Fired when the user clicks the promo card link. |
#### SidebarVariant
Inherits: `'flat' & 'inset' & 'floating'`
`'flat' | 'inset' | 'floating'`
#### SidebarCollapseMode
Inherits: `'rail' & 'hide'`
`'rail' | 'hide'`
#### SidebarProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `groups` (required) | `SidebarGroup[]` | `—` | Grouped navigation sections rendered inside the scrollable sidebar body. |
| `activeId` | `string` | `—` | Controlled active item or sub-item id. |
| `defaultActiveId` | `string` | `—` | Uncontrolled initial active item id. |
| `onSelect` | `(id: string) => void` | `—` | Fired when any item or sub-item is selected. |
| `collapsed` | `boolean` | `—` | Controlled collapsed state. |
| `defaultCollapsed` | `boolean` | `false` | Uncontrolled initial collapsed state. Defaults to `false`. |
| `onCollapsedChange` | `(collapsed: boolean) => void` | `—` | Fired when the collapsed state toggles. |
| `collapsible` | `boolean` | `true` | Shows the built-in collapse toggle button in the header. Defaults to `true`. |
| `collapseMode` | `SidebarCollapseMode` | `'rail'` | How collapsing behaves: `'rail'` shrinks to an icon rail (default), `'hide'` hides the panel while keeping any primary `rail`. |
| `variant` | `SidebarVariant` | `'flat'` | Visual chrome variant: `'flat'`, `'inset'`, or `'floating'`. Defaults to `'flat'`. |
| `shortcut` | `boolean` | `false` | Enable Cmd/Ctrl+B keyboard shortcut to toggle collapsed state. |
| `workspace` | `SidebarWorkspaceConfig` | `—` | Optional workspace switcher header with monogram/logo mark that cross-fades to the expand icon on collapsed hover. |
| `search` | `boolean \| SidebarSearchConfig` | `—` | Optional built-in search box (`true` / `{ mode: 'filter' }`) or command trigger (`{ mode: 'trigger', shortcut: '⌘K' }`); collapses into a search icon button in rail mode. |
| `promos` | `readonly SidebarPromoItem[]` | `—` | Optional dismissible stacked promo/changelog deck rendered above the footer in expanded mode. |
| `onDismissPromo` | `(id: string) => void` | `—` | Fired when a promo card is dismissed. |
| `account` | `SidebarAccountConfig` | `—` | Optional interactive user account footer button with a floating dropdown menu (shrinks to clickable avatar in collapsed rail). |
| `rail` | `SidebarRailConfig` | `—` | Optional persistent primary icon rail (dual-rail layout as in Kanban / Slack / Linear workspaces). |
| `resizable` | `boolean` | `false` | Enables pointer-drag resizing along the sidebar's right edge. Defaults to `false`. |
| `minWidth` | `number` | `180` | Minimum drag-resize width in pixels. Defaults to `180`. |
| `maxWidth` | `number` | `360` | Maximum drag-resize width in pixels. Defaults to `360`. |
| `onWidthChange` | `(width: number) => void` | `—` | Fired while drag-resizing the sidebar width. |
| `width` | `number` | `236` | Expanded sidebar panel width in pixels. Defaults to `236`. |
| `collapsedWidth` | `number` | `56` | Collapsed mini-rail width in pixels when `collapseMode="rail"`. Defaults to `56`. |
| `header` | `React.ReactNode \| ((collapsed: boolean) => React.ReactNode)` | `—` | Custom header slot or render function receiving `collapsed` (used when `workspace` is not set). |
| `footer` | `React.ReactNode \| ((collapsed: boolean) => React.ReactNode)` | `—` | Custom footer slot or render function receiving `collapsed` (rendered alongside or instead of `account`). |
| `collapseLabel` | `string` | `'Collapse sidebar'` | Accessible label for the collapse button. |
| `expandLabel` | `string` | `'Expand sidebar'` | Accessible label for the expand button. |
| `dismissPromoLabel` | `string` | `'Dismiss notice'` | Accessible label for the promo card dismiss button. |
| `emptySearchText` | `string` | `'No matching items'` | Message shown when inline search filters out every item. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `React.CSSProperties` | `—` | Inline CSS styles applied to the root element. |
| `'aria-label'` | `string` | `'Workspace navigation'` | Accessible label for assistive technologies. |
---
## Command Menu
- **URL**: https://ui.biu.dev/docs/components/command-menu
- **Category**: Navigation
- **Edition**: Open Source (MIT)
- **Summary**: Keyboard-first command palette with instant fuzzy filtering, groups, and shortcut hints.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/command-menu`
- **Install (npm)**: `import { CommandMenu } from "@biudev/ui/command-menu"`
- **Public Source**: https://ui.biu.dev/docs/source/command-menu
### Usage
```tsx
import { useState } from "react";
import { CommandMenu } from "@/components/ui/biu/command-menu";
export function Example() {
const [result, setResult] = useState("");
return (
);
}
```
### API Reference
#### CommandItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `hint` | `string` | `—` | Helper text or inline hint shown alongside the item or field. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
| `keys` | `string[]` | `—` | Keycap sequence displayed for the command shortcut. |
| `keywords` | `string[]` | `—` | Additional search keywords matched during filtering. |
| `disabled` | `boolean` | `—` | Disables interaction and applies disabled styling. |
#### CommandGroup
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `commands` (required) | `readonly CommandItem[]` | `—` | List of command entries available in the menu. |
#### CommandMenuProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `groups` (required) | `readonly CommandGroup[]` | `—` | Grouped collections of options or navigation items. |
| `onRun` (required) | `(id: string, query?: string) => void` | `—` | Callback invoked when a command is executed. |
| `onClose` | `() => void` | `—` | Callback invoked when the overlay or menu requests dismissal. |
| `placeholder` | `string` | `'Type a command or search…'` | Placeholder text displayed when the input is empty. |
| `label` | `string` | `'Command'` | Visible text label or accessible name. |
| `listLabel` | `string` | `'Commands'` | Accessible label for the command listbox. |
| `askLabel` | `(query: string) => string` | `query => `Ask assistant about “${query}”`` | Label prefix for the fallback Ask AI command. |
| `askFallback` | `boolean` | `true` | Shows a fallback Ask AI command when no static items match. |
| `assistantGroupLabel` | `string` | `'Assistant'` | Heading for the fallback assistant command group. |
| `emptyText` | `string` | `'No commands found.'` | Message displayed when no commands match the query. |
| `sectionHint` | `string` | `'to jump between sections'` | Hint label shown beside section navigation commands. |
| `openHint` | `string` | `'to open'` | Hint label shown beside command items that open a route. |
| `autoFocus` | `boolean` | `false` | Focuses the search input immediately on mount. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
---
## Avatar
- **URL**: https://ui.biu.dev/docs/components/avatar
- **Category**: Data Display
- **Edition**: Open Source (MIT)
- **Summary**: User and workspace avatars with monogram fallbacks, online status dots, and overlapping stacks.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/avatar`
- **Install (npm)**: `import { Avatar } from "@biudev/ui/avatar"`
- **Public Source**: https://ui.biu.dev/docs/source/avatar
### Usage
```tsx
import { Avatar, AvatarGroup } from "@/components/ui/biu/avatar";
export function Example() {
return (
);
}
```
### API Reference
#### AvatarSize
Inherits: `'xs' & 'sm' & 'md' & 'lg' & 'xl'`
`'xs' | 'sm' | 'md' | 'lg' | 'xl'`
#### AvatarShape
Inherits: `'circle' & 'rounded' & 'square'`
`'circle' | 'rounded' | 'square'`
#### AvatarStatus
Inherits: `'online' & 'busy' & 'away' & 'offline'`
`'online' | 'busy' | 'away' | 'offline'`
#### AvatarKind
Inherits: `'user' & 'workspace' & 'agent'`
`'user' | 'workspace' | 'agent'`
#### AvatarVariant
Inherits: `'soft' & 'solid' & 'outline'`
`'soft' | 'solid' | 'outline'`
#### AvatarProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `src` | `string` | `—` | Image source URL. |
| `alt` | `string` | `—` | Alternative text describing the image. |
| `name` | `string` | `—` | Form field name or display name. |
| `roleLabel` | `string` | `—` | Role or title text displayed next to the avatar. |
| `fallback` | `React.ReactNode` | `—` | Fallback content rendered when no image source is available. |
| `size` | `AvatarSize` | `'md'` | Size tier controlling height, padding, and typography. |
| `shape` | `AvatarShape` | `—` | Visual shape geometry (e.g. circle or rounded). |
| `kind` | `AvatarKind` | `'user'` | Entity or item classification kind. |
| `variant` | `AvatarVariant` | `'soft'` | Visual style variant. |
| `color` | `string` | `—` | Accent color for AI agent pixel mark or solid/ring emphasis. |
| `working` | `boolean` | `false` | Animate the AI agent pixel mark while working. |
| `status` | `AvatarStatus` | `—` | Current lifecycle or execution status. |
| `statusPulse` | `boolean` | `false` | Softly pulse the status dot (useful for live/online presence). |
| `tooltip` | `boolean` | `false` | Show a floating tooltip with name/role on hover. |
| `ring` | `boolean` | `false` | Adds a decorative outer ring around the avatar. |
#### AvatarGroupItem
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | `—` | Unique identifier for this element or item. |
| `src` | `string` | `—` | Image source URL. |
| `alt` | `string` | `—` | Alternative text describing the image. |
| `name` | `string` | `—` | Form field name or display name. |
| `roleLabel` | `string` | `—` | Role or title text displayed next to the avatar. |
| `kind` | `AvatarKind` | `—` | Entity or item classification kind. |
| `color` | `string` | `—` | Accent or swatch CSS color value. |
| `working` | `boolean` | `—` | Shows an active animated working ring on an agent avatar. |
| `status` | `AvatarStatus` | `—` | Current lifecycle or execution status. |
#### AvatarGroupProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `AvatarGroupItem[]` | `—` | Ordered list of items rendered by the component. |
| `children` | `React.ReactNode` | `—` | Nested React content rendered inside the component. |
| `max` | `number` | `4` | Maximum allowed count, capacity, or character limit. |
| `size` | `AvatarSize` | `'md'` | Size tier controlling height, padding, and typography. |
| `shape` | `AvatarShape` | `'circle'` | Visual shape geometry (e.g. circle or rounded). |
| `tooltips` | `boolean` | `true` | Show floating name/role tooltips on avatar hover (defaults to true). |
---
## Badge
- **URL**: https://ui.biu.dev/docs/components/badge
- **Category**: Data Display
- **Edition**: Open Source (MIT)
- **Summary**: Compact status pills, tone indicators, and live dot counters across 6 semantic tones.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/badge`
- **Install (npm)**: `import { Badge } from "@biudev/ui/badge"`
- **Public Source**: https://ui.biu.dev/docs/source/badge
### Usage
```tsx
import { Badge } from "@/components/ui/biu/badge";
export function Example() {
return (
Complete
);
}
```
### API Reference
#### BadgeProps
Inherits: `ComponentPropsWithRef<'span'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tone` | `'neutral'\|'info'\|'success'\|'warning'\|'danger'\|'purple'` | `'neutral'` | Semantic color tone (neutral, info, success, warning, danger, or purple). |
| `size` | `'sm'\|'md'` | `'sm'` | Size tier controlling height, padding, and typography. |
| `dot` | `boolean` | `false` | Displays a status indicator dot inside the badge. |
| `live` | `boolean` | `false` | Animates the badge status dot with a live pulse. |
| `icon` | `ReactNode` | `—` | Leading icon element. |
| `count` | `number` | `—` | Numeric badge count displayed on the item. |
| `max` | `number` | `99` | Maximum allowed count, capacity, or character limit. |
---
## Data Table
- **URL**: https://ui.biu.dev/docs/components/data-table
- **Category**: Data Display
- **Edition**: Open Source (MIT)
- **Summary**: Sortable, filterable, paginated table with column visibility toggles and bulk row selection.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/data-table`
- **Install (npm)**: `import { DataTable } from "@biudev/ui/data-table"`
- **Public Source**: https://ui.biu.dev/docs/source/data-table
### Usage
```tsx
"use client";
import { DataTable } from "@/components/ui/biu/data-table";
export function Example() {
const rows = [
{ id: "1", customer: "Maya Labs", status: "Paid", amount: 240 },
{ id: "2", customer: "Nordic Cloud", status: "Pending", amount: 1200 },
];
return (
`$${row.amount}` },
]}
/>
);
}
```
### API Reference
#### DataTableSortDirection
Inherits: `'asc' & 'desc'`
`'asc' | 'desc'`
#### DataTableSort
Inherits: `null`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `key` | `string` | `—` | Unique key identifying this column, series, or record. |
| `direction` | `DataTableSortDirection` | `—` | Primary layout or sort direction. |
#### DataTableColumn
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `key` (required) | `string` | `—` | Unique key identifying this column, series, or record. |
| `header` (required) | `React.ReactNode` | `—` | Header label or custom header element. |
| `label` | `string` | `—` | Visible text label or accessible name. |
| `accessor` | `(row: T) => unknown` | `—` | Extract raw value for default cell rendering, sorting, and search filtering. |
| `searchValue` | `(row: T) => string` | `—` | Extract searchable text when a custom cell renders extra fields (e.g. email under name). |
| `cell` | `(row: T, index: number) => React.ReactNode` | `—` | Custom cell renderer receiving the current row. |
| `sortable` | `boolean` | `—` | Enables click-to-sort interaction on this column. |
| `sortFn` | `(a: T, b: T) => number` | `—` | Custom comparator function used when sorting this column. |
| `hideable` | `boolean` | `—` | Whether the column can be hidden from the Columns menu. |
| `defaultHidden` | `boolean` | `—` | Starts the column hidden until toggled visible by the user. |
| `align` | `'left' \| 'center' \| 'right'` | `—` | Alignment relative to the anchor or column cells. |
| `width` | `number \| string` | `—` | Explicit CSS width of the sidebar or column. |
#### DataTableFilterOption
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `string` | `—` | Controlled current value. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
#### DataTableFilter
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `key` (required) | `string` | `—` | Unique key identifying this column, series, or record. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `options` (required) | `DataTableFilterOption[]` | `—` | Available selectable options. |
| `accessor` | `(row: T) => string \| string[]` | `—` | Extracts the facet value from a row for filtering. |
#### DataTableLabels
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `clearSearch` (required) | `string` | `—` | Accessible label for clearing the search query. |
| `clearFilter` (required) | `string` | `—` | Label for clearing an active facet filter. |
| `resetFilters` (required) | `string` | `—` | Label for resetting all active search and facet filters. |
| `columns` (required) | `string` | `—` | Column definitions configuring headers, cells, and sorting. |
| `showAllColumns` (required) | `string` | `—` | Label for restoring all hidden columns. |
| `selected` (required) | `string` | `—` | Whether this item or surface is currently selected. |
| `clearSelection` (required) | `string` | `—` | Label for clearing all selected rows. |
| `selectAllOnPage` (required) | `string` | `—` | Accessible label for selecting every row on the current page. |
| `deselectAllOnPage` (required) | `string` | `—` | Accessible label for deselecting rows on the current page. |
| `selectRow` (required) | `(id: string) => string` | `—` | Formatter returning the accessible checkbox label for a row. |
| `toggleColumnsMenu` (required) | `string` | `—` | Accessible label for the column visibility toggle button. |
| `filterMenu` (required) | `(label: string) => string` | `—` | Formatter returning the accessible label for a filter menu. |
| `filterOptionsMenu` (required) | `(label: string) => string` | `—` | Formatter returning the accessible label for filter options. |
#### DataTableProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data` (required) | `T[]` | `—` | Array of data records rendered by the table or chart. |
| `columns` (required) | `DataTableColumn[]` | `—` | Column definitions configuring headers, cells, and sorting. |
| `getRowId` | `(row: T, index: number) => string` | `—` | Stable unique row ID extractor. Defaults to row.id, or stable object identity when id is omitted. |
| `searchable` | `boolean` | `false` | Displays a search input in the table toolbar. |
| `searchPlaceholder` | `string` | `'Search…'` | Placeholder text inside the table search input. |
| `search` | `string` | `—` | Controlled search query string. |
| `defaultSearch` | `string` | `''` | Initial uncontrolled search query. |
| `onSearchChange` | `(value: string) => void` | `—` | Callback invoked when the search query changes. |
| `filters` | `DataTableFilter[]` | `—` | Facet filter definitions rendered in the table toolbar. |
| `sort` | `DataTableSort` | `—` | Controlled sort column key and direction. |
| `defaultSort` | `DataTableSort` | `null` | Initial uncontrolled sort state. |
| `onSortChange` | `(sort: DataTableSort) => void` | `—` | Callback invoked when column sorting changes. |
| `selectable` | `boolean` | `false` | Adds row selection checkboxes to the table. |
| `selectedIds` | `string[]` | `—` | Controlled array of selected row IDs. |
| `defaultSelectedIds` | `string[]` | `[]` | Initial uncontrolled selected row IDs. |
| `onSelectionChange` | `(ids: string[]) => void` | `—` | Callback invoked when selected row IDs change. |
| `selectionActions` | `(selectedRows: T[], clearSelection: () => void) => React.ReactNode` | `—` | Bulk action controls shown when one or more rows are selected. |
| `columnVisibility` | `boolean` | `false` | Shows a Columns menu to toggle column visibility. |
| `hiddenColumns` | `string[]` | `—` | Controlled list of hidden column keys. |
| `defaultHiddenColumns` | `string[]` | `—` | Initial uncontrolled list of hidden column keys. |
| `onHiddenColumnsChange` | `(keys: string[]) => void` | `—` | Callback invoked when column visibility changes. |
| `paginate` | `boolean` | `true` | Enables client-side pagination controls below the table. |
| `pageSize` | `number` | `5` | Number of rows per page. Updates when the prop changes. |
| `pageSizes` | `number[]` | `[5, 10, 25]` | Selectable page-size options shown in the pagination control. |
| `page` | `number` | `—` | Current 1-based page number. |
| `onPageChange` | `(page: number) => void` | `—` | Callback invoked when the active page changes. |
| `onPageSizeChange` | `(size: number) => void` | `—` | Callback invoked when the page size changes. |
| `paginationLabels` | `Partial` | `—` | Localized label overrides forwarded to the pagination bar. |
| `labels` | `Partial` | `—` | Override built-in UI strings for any language or i18n library. |
| `locale` | `string` | `—` | BCP 47 locale used for both locale-aware sorting and Pagination number formatting. |
| `density` | `'compact' \| 'default' \| 'comfortable'` | `'default'` | Row vertical padding density. |
| `stickyHeader` | `boolean` | `false` | Pin the table header inside the table scroll container (pair with maxHeight for vertical scrolling). |
| `maxHeight` | `number \| string` | `—` | Maximum height before internal scrolling activates. |
| `toolbarExtra` | `React.ReactNode` | `—` | Extra controls rendered at the trailing end of the toolbar. |
| `emptyTitle` | `React.ReactNode` | `'No results found'` | Heading shown when the table has no matching rows. |
| `emptyDescription` | `React.ReactNode` | `'Try adjusting your search or filter criteria.'` | Supporting message shown in the empty table state. |
| `onRowClick` | `(row: T) => void` | `—` | Callback invoked when a table body row is clicked. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `React.CSSProperties` | `—` | Inline CSS styles applied to the root element. |
| `'aria-label'` | `string` | `'Data table'` | Accessible label for assistive technologies. |
---
## Toaster
- **URL**: https://ui.biu.dev/docs/components/toaster
- **Category**: Feedback & Status
- **Edition**: Open Source (MIT)
- **Summary**: Stackable status notifications with undo actions, timers, and pause-on-hover behavior.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/toaster`
- **Install (npm)**: `import { Toaster } from "@biudev/ui/toaster"`
- **Public Source**: https://ui.biu.dev/docs/source/toaster
### Usage
```tsx
import { Button } from "@/components/ui/biu/button";
import { Toaster, toast } from "@/components/ui/biu/toaster";
export function Example() {
return (
<>
>
);
}
```
### API Reference
#### ToasterProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `position` | `'top-left' \| 'top-center' \| 'top-right' \| 'bottom-left' \| 'bottom-center' \| 'bottom-right'` | `'bottom-right'` | Screen corner or edge where toast notifications appear. |
| `duration` | `number` | `4000` | Auto-dismiss duration in milliseconds. |
| `visibleToasts` | `number` | `3` | Maximum number of simultaneously visible toasts. |
| `label` | `string` | `'Notifications'` | Visible text label or accessible name. |
| `dismissLabel` | `string` | `'Dismiss notification'` | Accessible label for dismissing a toast notification. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Spinner
- **URL**: https://ui.biu.dev/docs/components/spinner
- **Category**: Feedback & Status
- **Edition**: Open Source (MIT)
- **Summary**: Zero-dependency loading indicators spanning crisp inline arcs and 16 pure-CSS motion loaders.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/spinner`
- **Install (npm)**: `import { Spinner } from "@biudev/ui/spinner"`
- **Public Source**: https://ui.biu.dev/docs/source/spinner
### Usage
```tsx
import { Spinner } from "@/components/ui/biu/spinner";
export function Example() {
return (
);
}
```
### API Reference
#### SpinnerVariant
Inherits: `'spinner' & 'dots' & 'bars' & 'dot-matrix' & 'dither' & 'morph' & 'comet' & 'metaballs' & 'newton' & 'helix' & 'scramble' & 'percent' & 'ascii' & 'ascii-line' & 'ascii-braille' & 'ascii-blocks' & 'ascii-bounce'`
`| 'spinner'
| 'dots'
| 'bars'
| 'dot-matrix'
| 'dither'
| 'morph'
| 'comet'
| 'metaballs'
| 'newton'
| 'helix'
| 'scramble'
| 'percent'
| 'ascii'
| 'ascii-line'
| 'ascii-braille'
| 'ascii-blocks'
| 'ascii-bounce'`
#### SpinnerProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `SpinnerVariant` | `'spinner'` | Visual animation variant (AffectUI Clean arc + all 16 BeUI Motion Loader variants). Defaults to `'spinner'`. |
| `size` | `number` | `16` | Base square size in pixels. Defaults to `16`. |
| `speed` | `number` | `1` | Cycle duration multiplier in seconds (lower = faster, higher = slower). Defaults to `1`. |
| `label` | `string` | `—` | Accessible status label (`role="status"` + `aria-label`). Omit when adjacent text already describes the state (`aria-hidden="true"`). |
| `scrambleText` | `string` | `'LOADING'` | Target string for `variant="scramble"`. Defaults to `'LOADING'`. |
---
## Skeleton
- **URL**: https://ui.biu.dev/docs/components/skeleton
- **Category**: Feedback & Status
- **Edition**: Open Source (MIT)
- **Summary**: Content-matched loading placeholders with synchronized shimmer sweep and flash-free delayed wrappers.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/skeleton`
- **Install (npm)**: `import { Skeleton } from "@biudev/ui/skeleton"`
- **Public Source**: https://ui.biu.dev/docs/source/skeleton
### Usage
```tsx
import { Loading, Skeleton } from "@/components/ui/biu/skeleton";
export function Example() {
return (
);
}
```
### API Reference
#### SkeletonAnimation
Inherits: `'shimmer' & 'pulse' & 'none'`
`'shimmer' | 'pulse' | 'none'`
#### SkeletonSurface
Inherits: `'clean' & 'classic'`
`'clean' | 'classic'`
#### SkeletonProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `width` | `number \| string` | `—` | Width of the placeholder shape (`number` converts to `px`). Defaults to `100%` via CSS. |
| `height` | `number \| string` | `—` | Height of the placeholder shape (`number` converts to `px`). Defaults to `12px` via CSS. |
| `radius` | `number \| string` | `—` | Corner radius (`number` converts to `px`, or CSS value like `"50%"`). Defaults to `6px`. |
| `circle` | `boolean` | `false` | Shorthand for circular placeholders such as avatars; mirrors `width` or `height` if only one is supplied. |
| `line` | `boolean \| number \| string` | `—` | Reserves the exact line box of text (`1lh` when `true`, or a custom CSS length / pixel number) and centers the bar inside it so swapping to real copy never shifts layout. |
| `animation` | `SkeletonAnimation` | `—` | Motion style. Defaults to `'shimmer'` (or inherits from a parent ``). |
| `surface` | `SkeletonSurface` | `—` | Surface fill style: translucent `'clean'` (default) or opaque `'classic'`. Inherits from ``. |
#### LoadingProps
Inherits: `Omit, 'role'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | `'Loading'` | Single accessible status label announced for the entire loading area. Defaults to `'Loading'`. |
| `delay` | `number` | `150` | Fade-in delay in milliseconds so fast loads never flash gray placeholders. Pass `0` to reveal immediately. Defaults to `150`. |
| `animation` | `SkeletonAnimation` | `—` | Default animation inherited by descendant `` bars that do not set their own. |
| `surface` | `SkeletonSurface` | `—` | Default surface inherited by descendant `` bars that do not set their own. |
| `children` | `ReactNode` | `—` | Nested React content rendered inside the component. |
#### SkeletonTextProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `lines` | `number` | `3` | Number of text lines to render. Defaults to `3`. |
| `widths` | `ReadonlyArray` | `—` | Optional per-line widths; defaults to full lines with a shorter final line (`68%`). |
| `barHeight` | `number \| string` | `10` | Height of each placeholder bar inside its line box. Defaults to `10`. |
| `lineHeight` | `boolean \| number \| string` | `true` | Line box height passed to each bar's `line` prop. Defaults to `true` (`1lh`). |
| `gap` | `number \| string` | `6` | Vertical gap between lines (`number` converts to `px`). Defaults to `6`. |
| `animation` | `SkeletonAnimation` | `—` | Motion style applied to all lines. |
| `surface` | `SkeletonSurface` | `—` | Surface style applied to all lines. |
---
## Empty State
- **URL**: https://ui.biu.dev/docs/components/empty-state
- **Category**: Feedback & Status
- **Edition**: Open Source (MIT)
- **Summary**: Quiet framed and bare placeholders for uninitialized lists, empty searches, and blank inspectors.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/empty-state`
- **Install (npm)**: `import { EmptyState } from "@biudev/ui/empty-state"`
- **Public Source**: https://ui.biu.dev/docs/source/empty-state
### Usage
```tsx
import { Button } from "@/components/ui/biu/button";
import { EmptyState } from "@/components/ui/biu/empty-state";
export function Example() {
return (
+ New schedule
}
/>
);
}
```
### API Reference
#### EmptyStateVariant
Inherits: `'clean' & 'classic'`
`'clean' | 'classic'`
#### EmptyStateSize
Inherits: `'sm' & 'md' & 'lg'`
`'sm' | 'md' | 'lg'`
#### EmptyStateProps
Inherits: `Omit, 'title'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` (required) | `ReactNode` | `—` | Primary heading text describing the empty or uninitialized state. |
| `description` | `ReactNode` | `—` | Supporting copy explaining why the area is empty or what to do next. |
| `text` | `ReactNode` | `—` | Alias for `description` for concise AffectUI-style composition. |
| `action` | `ReactNode` | `—` | Optional action button(s) rendered in a centered wrapping row below the copy. |
| `icon` | `ReactNode \| false \| null` | `—` | Custom icon node; defaults to a neutral document glyph. Pass `null` or `false` to omit the icon tile. |
| `variant` | `EmptyStateVariant` | `'clean'` | Frame and icon tile styling: translucent `'clean'` (default) or dashed-card `'classic'`. |
| `size` | `EmptyStateSize` | `'md'` | Density scale controlling padding, icon tile size, and typography. Defaults to `'md'`. |
| `bare` | `boolean` | `false` | Removes the outer frame padding, fill, and border so the empty state sits flush inside a panel or canvas. |
| `tall` | `boolean` | `false` | Vertically centers the empty state inside a fixed-height parent (`min-height: 100%`). |
---
## Card
- **URL**: https://ui.biu.dev/docs/components/card
- **Category**: Layout & Surfaces
- **Edition**: Open Source (MIT)
- **Summary**: Flexible content containers supporting tactile hover lift, interactive, and selectable states.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/card`
- **Install (npm)**: `import { Card } from "@biudev/ui/card"`
- **Public Source**: https://ui.biu.dev/docs/source/card
### Usage
```tsx
import { Card, CardHeader, CardContent } from "@/components/ui/biu/card";
export function Example() {
return (
Everything is up to date.
);
}
```
### API Reference
#### CardProps
Inherits: `HTMLAttributes`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `ref` | `Ref` | `—` | React ref forwarded to the underlying DOM element. |
| `as` | `'div' \| 'section' \| 'article' \| 'li'` | `'div'` | Underlying semantic element rendered for the card container. |
| `interactive` | `boolean` | `—` | Enables hover elevation and full-card interactive target styling. |
| `selected` | `boolean` | `—` | Highlights the card in a selected visual state. |
#### CardHeaderProps
Inherits: `Omit, 'title'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` (required) | `ReactNode` | `—` | Primary title rendered in the card header. |
| `description` | `ReactNode` | `—` | Supporting subtitle displayed beneath the card title. |
| `icon` | `ReactNode` | `—` | Leading icon rendered next to the card title. |
| `action` | `ReactNode` | `—` | Trailing action element aligned to the right side of the header. |
| `titleAs` | `'h2' \| 'h3' \| 'h4' \| 'p'` | `'h3'` | Heading tag used to render the card title. |
---
## Separator
- **URL**: https://ui.biu.dev/docs/components/separator
- **Category**: Layout & Surfaces
- **Edition**: Open Source (MIT)
- **Summary**: Crisp horizontal and vertical hairlines with optional inline labels and semantic roles.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/separator`
- **Install (npm)**: `import { Separator } from "@biudev/ui/separator"`
- **Public Source**: https://ui.biu.dev/docs/source/separator
### Usage
```tsx
import { Separator } from "@/components/ui/biu/separator";
export function Example() {
return (
);
}
```
### API Reference
#### SeparatorOrientation
Inherits: `'horizontal' & 'vertical'`
`'horizontal' | 'vertical'`
#### SeparatorVariant
Inherits: `'solid' & 'dashed' & 'subtle'`
`'solid' | 'dashed' | 'subtle'`
#### SeparatorLabelAlign
Inherits: `'center' & 'start' & 'end'`
`'center' | 'start' | 'end'`
#### SeparatorProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `orientation` | `SeparatorOrientation` | `'horizontal'` | Axis of the divider line. Defaults to `'horizontal'`. |
| `variant` | `SeparatorVariant` | `'solid'` | Visual style of the divider line. Defaults to `'solid'`. |
| `decorative` | `boolean` | `true` | When `true` (default), hides the divider line from assistive tech; set `false` for a semantic `role="separator"`. |
| `label` | `ReactNode` | `—` | Optional inline label for horizontal dividers (e.g. `"or"`, `"Today"`, `"Earlier"`). Ignored when vertical. |
| `labelAlign` | `SeparatorLabelAlign` | `'center'` | Horizontal alignment of the inline label. Defaults to `'center'`. |
---
## Scroll Area
- **URL**: https://ui.biu.dev/docs/components/scroll-area
- **Category**: Layout & Surfaces
- **Edition**: Open Source (MIT)
- **Summary**: Custom-styled vertical and horizontal scroll containers with fade masks and slim scrollbars.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/scroll-area`
- **Install (npm)**: `import { ScrollArea } from "@biudev/ui/scroll-area"`
- **Public Source**: https://ui.biu.dev/docs/source/scroll-area
### Usage
```tsx
import { ScrollArea } from "@/components/ui/biu/scroll-area";
export function Example() {
return (
Design review completed.
Development is in progress.
Testing starts next week.
);
}
```
### API Reference
#### ScrollAreaProps
Inherits: `Omit,'onScroll'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `orientation` | `'vertical'\|'horizontal'\|'both'` | `'vertical'` | Layout axis (horizontal or vertical). |
| `type` | `'hover'\|'scroll'\|'always'` | `'hover'` | Menu item or input control type. |
| `fade` | `boolean` | `false` | Applies edge gradient fades when scroll content overflows. |
| `maxHeight` | `number\|string` | `—` | Maximum height before internal scrolling activates. |
| `viewportRef` | `Ref` | `—` | Ref forwarded to the scrollable viewport element. |
| `onScroll` | `UIEventHandler` | `—` | Scroll event handler attached to the scroll viewport. |
---
## Resizable
- **URL**: https://ui.biu.dev/docs/components/resizable
- **Category**: Layout & Surfaces
- **Edition**: Open Source (MIT)
- **Summary**: Accessible split-pane layouts with drag handles, snap collapse, keyboard resize, and double-click reset.
- **Install (shadcn)**: `pnpm dlx shadcn add @biudev/resizable`
- **Install (npm)**: `import { Resizable } from "@biudev/ui/resizable"`
- **Public Source**: https://ui.biu.dev/docs/source/resizable
### Usage
```tsx
"use client";
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/biu/resizable";
export function Example() {
return (
);
}
```
### API Reference
#### ResizableDirection
Inherits: `'horizontal' & 'vertical'`
`'horizontal' | 'vertical'`
#### ResizablePanelHandle
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `collapse` (required) | `() => void` | `—` | Programmatically collapses the panel to its collapsedSize. |
| `expand` (required) | `(minSize?: number) => void` | `—` | Programmatically expands a collapsed panel back to its previous size. |
| `resize` (required) | `(size: number) => void` | `—` | Resizes the panel to a specific percentage size. |
| `getSize` (required) | `() => number` | `—` | Returns the panel current percentage size. |
| `isCollapsed` (required) | `() => boolean` | `—` | Returns true when the panel is currently collapsed. |
#### ResizablePanelGroupProps
Inherits: `Omit, 'children'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` | `—` | Nested React content rendered inside the component. |
| `direction` | `ResizableDirection` | `—` | Layout axis. Supports both `direction` (AffectUI / v3) and `orientation` (shadcn Base / v4). |
| `orientation` | `ResizableDirection` | `—` | Alias for `direction` matching shadcn/ui Base Resizable v4 API. |
| `onLayout` | `(sizes: number[]) => void` | `—` | Called with percentage sizes (rounded to 1 decimal, summing to 100) whenever layout changes. |
| `onLayoutChange` | `(sizes: number[]) => void` | `—` | Alias for `onLayout` matching react-resizable-panels v4 API. |
| `keyboardStep` | `number` | `5` | Percentage step moved per Arrow key press (Shift doubles it). Defaults to 5. |
| `autoSaveId` | `string` | `—` | Optional localStorage key to persist and restore pane sizes across sessions. |
#### ResizablePanelProps
Inherits: `ComponentPropsWithRef<'div'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultSize` | `number` | `—` | Initial percentage size (0–100). Unspecified panes share remaining space evenly. |
| `minSize` | `number` | `—` | Minimum expanded percentage size (0–100). Defaults to 0. |
| `maxSize` | `number` | `—` | Maximum percentage size (0–100). Defaults to 100. |
| `collapsible` | `boolean` | `—` | Allow snapping the pane closed when dragged past half its minSize or toggled via Enter. |
| `collapsedSize` | `number` | `—` | Percentage size when collapsed (0 hides & sets `inert`; > 0 keeps e.g. an icon rail). Defaults to 0. |
| `onCollapse` | `() => void` | `—` | Called when a collapsible panel transitions into its collapsed state. |
| `onExpand` | `() => void` | `—` | Called when a collapsible panel expands from its collapsed state. |
| `onResize` | `(size: number) => void` | `—` | Called whenever this panel's percentage size changes. |
| `panelRef` | `Ref` | `—` | Imperative handle for programmatic collapse, expand, and resize. |
#### ResizableHandleProps
Inherits: `ComponentPropsWithRef<'div'>`
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `withHandle` | `boolean` | `false` | Render a centered visual drag grip pill over the hairline divider. |
| `handleVariant` | `'pill' \| 'dots'` | `'pill'` | Visual grip style when `withHandle` is enabled. Defaults to `'pill'`. |
| `disabled` | `boolean` | `false` | Disable dragging and keyboard resizing on this divider. |
---
## Stat Card
- **URL**: https://ui.biu.dev/docs/components/stat-card
- **Category**: Charts & Metrics
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: KPI metric cards with tabular values, semantic trend deltas, and interactive scrubbable SVG sparklines.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/stat-card` (Pro license required)
### Usage
```tsx
import { StatCard } from "@/components/ui/biu/stat-card";
export function Example() {
return (
);
}
```
### API Reference
#### SparklineProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data` (required) | `readonly number[]` | `—` | Ordered numeric series rendered left-to-right. |
| `labels` | `readonly string[]` | `—` | Optional point labels announced in hover scrub readout and accessible label. |
| `color` | `string` | `'#2563eb'` | Stroke and gradient accent color. Defaults to `'#2563eb'`. |
| `fill` | `boolean` | `true` | Render a subtle gradient fill beneath the line. Defaults to `true`. |
| `height` | `number` | `40` | SVG height in pixels. Defaults to `40`. |
| `formatValue` | `(value: number) => string` | `—` | Format hovered point values. |
| `onHoverIndex` | `(index: number \| null) => void` | `—` | Called when the user hovers or focuses a point index. |
| `'aria-label'` | `string` | `'Sparkline trend'` | Accessible chart label. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
#### StatTrend
Inherits: `'up' & 'down' & 'flat'`
`'up' | 'down' | 'flat'`
#### StatDeltaTone
Inherits: `'positive' & 'negative' & 'neutral'`
`'positive' | 'negative' | 'neutral'`
#### StatCardProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `ReactNode` | `—` | Metric title displayed at the top left. |
| `value` (required) | `ReactNode` | `—` | Primary formatted metric value (e.g. `'$48,920'`, `'99.96%'`). |
| `delta` | `string` | `—` | Change indicator badge text (e.g. `'+14.2%'`, `'-18ms'`). |
| `trend` | `StatTrend` | `'flat'` | Arrow direction for the delta badge. Defaults to `'flat'`. |
| `deltaTone` | `StatDeltaTone` | `—` | Semantic color tone for the delta badge (defaults to positive for `'up'`, negative for `'down'`). |
| `caption` | `ReactNode` | `—` | Secondary comparison caption (e.g. `'vs last 30 days'`). |
| `icon` | `ReactNode` | `—` | Optional trailing icon or badge in the header row. |
| `sparkline` | `readonly number[]` | `—` | Optional inline sparkline values rendered at the bottom of the card. |
| `sparklineLabels` | `readonly string[]` | `—` | Optional labels matching `sparkline` points for interactive scrub readout. |
| `sparklineColor` | `string` | `—` | Custom sparkline stroke color; defaults to trend-aware color. |
| `formatSparklineValue` | `(value: number) => string` | `—` | Format values while scrubbing the sparkline. |
| `variant` | `'card' \| 'bare'` | `'card'` | Visual surface treatment: `'card'` (framed) or `'bare'`. Defaults to `'card'`. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Area Chart
- **URL**: https://ui.biu.dev/docs/components/area-chart
- **Category**: Charts & Metrics
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Zero-dependency multi-series SVG area and line trends with synchronized crosshair tooltips and toggleable legend.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/area-chart` (Pro license required)
### Usage
```tsx
import { AreaChart } from "@/components/ui/biu/area-chart";
export function Example() {
return (
);
}
```
### API Reference
#### AreaChartSeries
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `key` (required) | `string` | `—` | Unique series key matching properties on each datum. |
| `label` (required) | `string` | `—` | Human-readable label shown in the legend and crosshair tooltip. |
| `color` | `string` | `—` | Stroke and area fill color. |
#### AreaChartPoint
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
#### AreaChartProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data` (required) | `readonly AreaChartPoint[]` | `—` | Ordered time-series data points. |
| `series` (required) | `readonly AreaChartSeries[]` | `—` | Series descriptors defining keys, labels, and colors. |
| `title` | `ReactNode` | `—` | Optional chart title rendered above the plot. |
| `subtitle` | `ReactNode` | `—` | Optional subtitle rendered beside or beneath the title. |
| `variant` | `'area' \| 'line'` | `'area'` | Render soft filled areas (`'area'`) or clean lines only (`'line'`). Defaults to `'area'`. |
| `curve` | `'smooth' \| 'linear'` | `'smooth'` | Path interpolation mode: `'smooth'` (cubic spline) or `'linear'`. Defaults to `'smooth'`. |
| `height` | `number` | `220` | Plot height in pixels. Defaults to `220`. |
| `showLegend` | `boolean` | `true` | Show interactive legend pills allowing users to toggle individual series. Defaults to `true`. |
| `showGrid` | `boolean` | `true` | Show horizontal dashed gridlines and Y-axis tick labels. Defaults to `true`. |
| `formatValue` | `(value: number) => string` | `defaultFormatter.format` | Format numeric tick and tooltip values. |
| `'aria-label'` | `string` | `'Area chart'` | Accessible chart label. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Bar Chart
- **URL**: https://ui.biu.dev/docs/components/bar-chart
- **Category**: Charts & Metrics
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Grouped, stacked, and horizontal ranked bar visualizations with hover breakdown tooltips and series filtering.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/bar-chart` (Pro license required)
### Usage
```tsx
import { BarChart } from "@/components/ui/biu/bar-chart";
export function Example() {
return (
);
}
```
### API Reference
#### BarChartSeries
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `key` (required) | `string` | `—` | Unique key identifying this column, series, or record. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `color` | `string` | `—` | Accent or swatch CSS color value. |
#### BarChartDatum
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
#### BarChartProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data` (required) | `readonly BarChartDatum[]` | `—` | Categorical rows plotted along the primary axis. |
| `series` (required) | `readonly BarChartSeries[]` | `—` | One or more series plotted as grouped or stacked bars. |
| `title` | `ReactNode` | `—` | Optional heading rendered above the chart. |
| `subtitle` | `ReactNode` | `—` | Optional secondary description. |
| `layout` | `'vertical' \| 'horizontal'` | `'vertical'` | Bar orientation: `'vertical'` (columns) or `'horizontal'` (ranked rows). Defaults to `'vertical'`. |
| `stacked` | `boolean` | `false` | Stack multiple series into a single bar per category. Defaults to `false`. |
| `height` | `number` | `220` | Vertical plot height in pixels. Defaults to `220`. |
| `showLegend` | `boolean` | `true` | Show interactive series legend when multiple series are provided. Defaults to `true`. |
| `formatValue` | `(value: number) => string` | `defaultFormatValue` | Format numeric ticks and tooltip readouts. |
| `'aria-label'` | `string` | `'Bar chart'` | Accessible chart label. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Usage Meter
- **URL**: https://ui.biu.dev/docs/components/usage-meter
- **Category**: Charts & Metrics
- **Edition**: BIU UI Pro (interactive preview & API public)
- **Summary**: Segmented and threshold-aware progress meters for AI token budgets, context windows, and API spend quotas.
- **Install (Pro Registry)**: `npx shadcn@latest add @biudev-pro/usage-meter` (Pro license required)
### Usage
```tsx
import { UsageMeter } from "@/components/ui/biu/usage-meter";
export function Example() {
return (
);
}
```
### API Reference
#### UsageMeterSegment
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | `—` | Unique identifier for this element or item. |
| `label` (required) | `string` | `—` | Visible text label or accessible name. |
| `value` (required) | `number` | `—` | Controlled current value. |
| `color` | `string` | `—` | Accent or swatch CSS color value. |
#### UsageMeterProps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `ReactNode` | `—` | Meter title (e.g. `'Context window'`, `'Monthly API quota'`). |
| `value` | `number` | `—` | Current total usage when rendering a single-value quota meter. |
| `segments` | `readonly UsageMeterSegment[]` | `—` | Optional segmented breakdown (sums automatically when `value` is omitted). |
| `max` | `number` | `100` | Maximum quota capacity. Defaults to `100`. |
| `valueLabel` | `ReactNode` | `—` | Optional formatted total readout (e.g. `'142K / 200K tokens'`). |
| `footer` | `ReactNode` | `—` | Optional footer note or action slot. |
| `height` | `number` | `8` | Bar thickness in pixels. Defaults to `8`. |
| `warnAt` | `number` | `75` | Warning threshold percentage (0–100) for single-bar tone. Defaults to `75`. |
| `dangerAt` | `number` | `90` | Danger threshold percentage (0–100) for single-bar tone. Defaults to `90`. |
| `variant` | `'card' \| 'bare'` | `'card'` | Visual surface treatment: `'card'` (framed) or `'bare'`. Defaults to `'card'`. |
| `formatValue` | `(value: number) => string` | `(v) => v.toLocaleString()` | Format segment numeric values in the breakdown legend. |
| `className` | `string` | `—` | Additional CSS class name applied to the root element. |
| `style` | `CSSProperties` | `—` | Inline CSS styles applied to the root element. |
---
## Workspace Blocks
### App Shell Flat — 3-Pane Flat AI Workspace
- **URL**: https://ui.biu.dev/blocks/app-shell-flat
- **Category**: App Shells & Auth
- **Edition**: Open Source (MIT)
- **Summary**: Edge-to-edge 3-pane flat workspace shell composed from BIU UI primitives with collapsible icon rail, ⌘K command menu, stacked changelog cards, setup guide, and multi-tab right work area.
- **Install**: `npx shadcn@latest add https://ui.biu.dev/r/0.1.0/app-shell-flat.json`
### Auth Screen — Sign-in, Sign-up & 6-Digit OTP
- **URL**: https://ui.biu.dev/blocks/auth-screen
- **Category**: App Shells & Auth
- **Edition**: Open Source (MIT)
- **Summary**: Split and centered authentication screen with SSO buttons, validated sign-in/sign-up forms, password reset, and 6-digit OTP verification.
- **Install**: `npx shadcn@latest add https://ui.biu.dev/r/0.1.0/auth-screen.json`
### App Shell Inset — Framed Rounded Workspace
- **URL**: https://ui.biu.dev/blocks/app-shell-inset
- **Category**: App Shells & Auth
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Collapsible sidebar on a subtle canvas framing rounded white main and right workspace cards, with ⌘K command palette, setup guide, and multi-tab work area.
### AI Chat Screen — 3-Pane Agent Conversation
- **URL**: https://ui.biu.dev/blocks/ai-chat-screen
- **Category**: AI Agent Workspaces
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Full-page 3-pane AI agent workspace combining multi-thread chat, streaming answers, inline citations, tool invocations, approvals, and a live Run Context inspector.
### Agent Inbox Workspace — 4-Pane Multi-Agent Operations
- **URL**: https://ui.biu.dev/blocks/agent-inbox-workspace
- **Category**: AI Agent Workspaces
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Four-pane multi-agent operations workspace with collapsible sidebar, resizable inbox queue, task tabs with pin/close, inline approvals, deliverables, and properties inspector.
### Run Inspector — Agent Trace Waterfall
- **URL**: https://ui.biu.dev/blocks/run-inspector
- **Category**: AI Agent Workspaces
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Agent observability workbench with collapsible span tree, aligned millisecond trace waterfall, copyable Input/Output payloads, error diagnostics, and token/cost attribution.
### Data Table 01 — SaaS Operations Workspace
- **URL**: https://ui.biu.dev/blocks/data-table-01
- **Category**: Data & Productivity
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Production SaaS operations table with live KPI cards, saved views, resizable & drag-reorderable columns, row inspector dialog, bulk actions, and pagination.
### Data Table 02 — Editable Spreadsheet Grid
- **URL**: https://ui.biu.dev/blocks/data-table-02
- **Category**: Data & Productivity
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Spreadsheet-style editable data grid with cell & rectangular range selection, direct type-to-edit editors, Excel/Sheets TSV copy & paste, and Undo/Redo.
### Kanban Board — Dual-Rail Task Workspace
- **URL**: https://ui.biu.dev/blocks/kanban-board
- **Category**: Data & Productivity
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Dual-rail inset Kanban workspace with icon rail, pinnable top tabs, drag-and-drop columns, inline task creation, live filtering, and floating task inspector drawer.
### Settings Workspace — Account, AI Policy & Billing
- **URL**: https://ui.biu.dev/blocks/settings-workspace
- **Category**: Data & Productivity
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Multi-section SaaS & AI settings console covering General profile, AI model guardrails, scoped API keys, Billing UsageMeter quotas, Notifications, and Members.
### Event Calendar 01 — Full Schedule Workspace
- **URL**: https://ui.biu.dev/blocks/event-calendar-01
- **Category**: Scheduling & Calendars
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Full-page Month, Week, and Day schedule workspace with collapsible mini-calendar sidebar, multi-calendar filters, drag-and-drop, and duration resize.
### Event Calendar 02 — Minimal Calendar Canvas
- **URL**: https://ui.biu.dev/blocks/event-calendar-02
- **Category**: Scheduling & Calendars
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Distraction-free full-width calendar canvas without left sidebar or filter chrome. Month-first default with full drag-and-drop and CRUD dialogs.
### Event Calendar 03 — Social Media Scheduler
- **URL**: https://ui.biu.dev/blocks/event-calendar-03
- **Category**: Scheduling & Calendars
- **Edition**: BIU UI Pro (live interactive preview)
- **Summary**: Social media content scheduling canvas with X, Instagram, YouTube, and LinkedIn channel filters, status pipeline, drag-and-drop, and post composer.