60
Production-ready components
Alpha UI is a React component system for teams that want fast implementation and reliable defaults. It includes polished primitives, typed APIs, and predictable composition patterns.
60
Production-ready components
4
Organized component families
Type-safe
Typed props and stories included
Normal Details
This documentation focuses only on components already built in the library. Every section here is practical: install, compose, test states, and ship UI screens without custom glue code.
Technical Details
The docs are aligned with the package export surface to keep examples production-safe. Component usage, props, and grouped taxonomy are intentionally consistent with build output and typed APIs.
Install Alpha UI once, then import what you need. Tree-shaking keeps your bundle compact.
npm install alpha-ui-kitA small setup showing card-based composition plus the new form primitives.
import { Button, Card, Input, Textarea } from 'alpha-ui-kit'
import 'alpha-ui-kit/styles.css'
export default function App() {
return (
<Card className="max-w-xl">
<Input label="Name" placeholder="Ada Lovelace" />
<Textarea label="Project Brief" rows={4} />
<Button className="mt-4">Create Project</Button>
</Card>
)
}Live playground: change props from controls and see both output and generated code update instantly.
Live output
import { Button } from 'alpha-ui-kit'
export default function Example() {
return (
<Button variant="contained" color="primary" size="medium">
Continue
</Button>
)
}Alpha UI provides a complete family of form controls — Input, Select, Textarea, Checkbox, RadioGroup, Switch, Calendar — all sharing a consistent label / helper-text / error-state API.
All input primitives work side-by-side inside a real form. Every field shares the same prop model: label, helperText, error, disabled, required.
Use full legal name.
Choose your primary stack.
The Input component passes the type prop directly to the underlying <input> element, giving you access to every native HTML input type with a consistent label and helper-text wrapper.
Email, password, number, search, tel, url, date, time, datetime-local, month, week, and color — all work out of the box.
Everything you need to know about building production-quality forms: from basic wiring to advanced validation, accessibility, and composition patterns.
A form input is the primary mechanism through which a user gives information to your application. Every piece of user-generated content — a username, password, search term, date, rating, phone number, colour preference — starts with some kind of input control. Despite how simple that sounds, form inputs are deceptively complex to build correctly. They have to handle keyboard navigation, mouse interaction, touch events on mobile, paste events, autofill from browsers, screen reader announcements, label associations, placeholder text, error messaging, and a host of other concerns before a single character of your product logic even runs.
Alpha UI's input system handles all of this infrastructure so you never have to write it yourself. Every field component in the library — Input, TextField, Select, Textarea, Checkbox, Switch, RadioGroup, Slider, Rating, and Autocomplete — runs on top of semantically correct HTML, ARIA roles, and a shared visual language so your forms feel immediately consistent, no matter which combination you use.
Consistent API
Every control shares label, helperText, error, disabled, and required — so swapping one control for another costs zero API re-learning.
Accessible by default
Labels are wired to inputs via htmlFor / aria-describedby automatically. Screen readers announce errors and helper text without extra markup.
Zero CSS required
Focus rings, hover states, error colours, and disabled styling are all built-in. Drop into any layout and it looks right immediately.
Every input component is built from four distinct visual zones. Understanding this anatomy helps you predict how props affect the rendered output and makes debugging significantly faster when something looks wrong.
The label is rendered as an HTML <label> element and programmatically linked to the input via the htmlFor attribute. This is what screen readers announce when the field receives focus. In "outlined" inputs the label floats above the border; in "standard" inputs it sits above a bottom line. Clicking the label focuses the input — a core accessibility requirement that Alpha UI handles for you.
The core interactive region — the rendered <input>, <textarea>, or <select> HTML element. This zone handles all keyboard and pointer events, browser autofill, paste events, composition events (for CJK input methods), and mobile soft-keyboard interactions. The border and focus ring live here and change colour based on the field's current state: default, focused, error, or disabled.
Rendered below the input, the helper text provides contextual guidance — format expectations, character limits, or hints. In Alpha UI this text is automatically wired via aria-describedby so screen readers include it in the field's accessible description. When helperText and error are both passed, error wins and visually replaces the helper text in red.
Start and end adornments allow you to embed icons, currency symbols, unit labels, or action buttons inside the input border without changing layout. Alpha UI handles the padding adjustments automatically so the text cursor always has sufficient space. Common uses include search icons (start) and clear buttons or show-password toggles (end).
This is one of the most misunderstood concepts in React forms. Every Alpha UI input can operate in one of two modes and choosing the right one determines how much boilerplate your form needs, how testable it is, and whether you need any external form library at all.
Uncontrolled ✦ Use for simple forms
You provide a defaultValue and let the DOM manage the rest. You only read the value when you need it — typically on form submit via a ref or FormData API. This is the fastest to implement and has zero re-renders as the user types.
When to use it: static registration forms, search bars, one-time settings screens where the value doesn't need to be mirrored into other parts of the UI.
// Uncontrolled usage
<Input
label="Username"
defaultValue="ada_lovelace"
// value is NOT tracked in state
/>Controlled ✦ Use for dynamic forms
You store the value in React state via useState and pass both value and onChange. Every keystroke triggers a re-render. In return you get full real-time control: live character-count displays, instant validation, conditional field visibility, dependent dropdowns, and real-time form submission state.
When to use it: multi-step wizards, dynamic field visibility, live search, form states that affect other parts of the page.
// Controlled usage
const [name, setName] = useState('')
<Input
label="Username"
value={name}
onChange={(e) => setName(e.target.value)}
/>⚠ Never mix the two modes for the same field
Providing both value and defaultValue on the same input, or switching from controlled (value defined) to uncontrolled (value={undefined}) mid-lifecycle, causes React to throw a warning and can produce unexpected behavior. Choose one mode and stick with it for the life of the component.
Validation is where most form implementations get messy. Alpha UI doesn't prescribe a specific validation library — instead it provides a clean error prop that accepts a string. When non-empty, the field enters an error visual state and the error string replaces the helperText below the field. You drive validation logic yourself and pass the result into this prop.
✓ Pros
Immediate feedback. Great for format validation (email format, phone number pattern). Low cognitive load for users.
✗ Cons
Can feel aggressive — showing "Invalid email" while the user is still typing "user@" is confusing. Solve with a debounce or by only validating after the field has been blurred at least once.
const [emailErr, setEmailErr] = useState('')
const [touched, setTouched] = useState(false)
const validate = (v: string) =>
touched && !/^[^@]+@[^@]+$/.test(v)
? 'Enter a valid email address'
: ''
<Input
label="Email"
type="email"
onChange={(e) => setEmailErr(validate(e.target.value))}
onBlur={() => setTouched(true)}
error={emailErr}
/>✓ Pros
User finishes typing before seeing any error. Feels balanced and non-intrusive. The most widely recommended UX pattern.
✗ Cons
Errors only appear after the user leaves each field. On a long form, they may not see all errors until they try to submit.
<Input
label="Name"
onBlur={(e) => {
if (!e.target.value)
setNameError('Name is required')
else
setNameError('')
}}
error={nameError}
/>✓ Pros
Validates the entire form at once. Great for short forms (login, contact). Users aren't interrupted while filling in.
✗ Cons
No real-time guidance. Users may be surprised by multiple errors appearing together on submit.
function handleSubmit() {
const errs: Record<string,string> = {}
if (!name) errs.name = 'Required'
if (!email) errs.email = 'Required'
setErrors(errs)
if (Object.keys(errs).length === 0) submit()
}The type prop on Alpha UI's Input maps directly to the HTML input type attribute. Choosing the right type gives you free browser features: appropriate soft keyboards on mobile, native picker UIs, built-in format validation, and browser autofill categories. Here's every type and why it matters:
| Type | HTML Value | When to Use | Mobile Keyboard |
|---|---|---|---|
| Text | text | Generic single-line text — names, usernames, short answers. | Default QWERTY |
email | Email addresses. Triggers browser autofill and validates basic email format on submit. | Email keyboard with @ key | |
| Password | password | Passwords and secrets. Masks characters. Browser password managers are activated. | Default QWERTY |
| Number | number | Integer or decimal quantities. Adds incrementer arrows. Use Slider for visual range inputs. | Numeric with decimal |
| Search | search | Search fields. Some browsers add a clear ✕ button. Semantic hint for assistive tech. | Search keyboard with Go key |
| Tel | tel | Phone numbers. Does NOT validate format — pair with a mask library. Summons numeric keypad. | Phone dial pad |
| URL | url | Website or link URLs. Validates basic URL format. Autofill offers recent visited URLs. | URL keyboard with .com key |
| Date | date | Date pickers (YYYY-MM-DD). Each browser renders its own native date widget. Use Calendar for a custom UI. | N/A — native picker |
| Time | time | HH:MM time selection. Native OS time picker. Good for scheduling fields. | N/A — native picker |
| Datetime-local | datetime-local | Combined date and time. Good for appointment or event creation forms. | N/A — native picker |
| Month / Week | month / week | Month or ISO week selection. Rarely used but handy for billing cycle or sprint planning forms. | N/A — native picker |
| Color | color | Native OS colour picker. Returns a hex value. Good for user theme or label customisation features. | N/A — native picker |
WCAG 2.1 Success Criterion 1.3.1 (Info and Relationships) requires that form labels be programmatically associated with their inputs. Success Criterion 3.3.1 requires that error identification is presented as text. Alpha UI satisfies both automatically. Here's what the library does for you and what you still need to consider:
Label–input association (handled by Alpha UI)
Every label element receives an htmlFor attribute that matches the input's generated id. Screen readers (NVDA, JAWS, VoiceOver) announce the label text when focus moves to the field.
Error announcement (handled by Alpha UI)
When the error prop is set, the error text is linked via aria-describedby. VoiceOver and other screen readers will announce "Name — required — This field is required" when the user focuses the errored field.
Disabled state (handled by Alpha UI)
Disabled inputs receive the HTML disabled attribute, not just a visual style. This prevents keyboard focus entirely, which is the correct accessible behavior.
Focus indication (handled by Alpha UI)
All inputs show an 8px focus ring on keyboard focus. This satisfies WCAG 2.4.7 (Focus Visible).
Required indication (your responsibility)
The required prop adds the HTML required attribute. You should also add a visual asterisk (*) or note in the label when using required, since colour alone ("the red fields are required") fails WCAG 1.4.1 (Use of Colour).
Group labelling (your responsibility)
When grouping related inputs (e.g. a RadioGroup or a set of checkboxes), wrap them in a <fieldset> with a <legend>. Alpha UI's RadioGroup renders the outer group with role="radiogroup" and aria-label, but if you compose your own groups you need to add this manually.
Live regions for async errors (your responsibility)
If you validate a field by hitting a server and the error arrives asynchronously, the error message won't be announced unless you add aria-live="polite" to the error region. Alpha UI's static error does not currently implement live regions — this is your responsibility for async validation flows.
Alpha UI inputs work seamlessly with any form-state library because they expose standard React props — value, onChange, onBlur, name, ref. You can spread a React Hook Form register() result directly:
React Hook Form
import { useForm } from 'react-hook-form'
import { Input } from 'alpha-ui-kit'
function Form() {
const { register, formState: { errors } } = useForm()
return (
<Input
label="Email"
type="email"
{...register('email', {
required: 'Email is required',
pattern: {
value: /^[^@]+@[^@]+$/,
message: 'Invalid email',
},
})}
error={errors.email?.message}
/>
)
}Zod + React Hook Form
import { z } from 'zod'
import { zodResolver } from '@hookform/resolvers/zod'
const schema = z.object({
email: z.string().email('Invalid email'),
name: z.string().min(2, 'Min 2 characters'),
})
const { register, formState } = useForm({
resolver: zodResolver(schema),
})Alpha UI ships several text-entry components and knowing which to reach for saves time and avoids re-works later. Think of them as levels of abstraction: Input is the base primitive, TextField is a smart wrapper that unifies Input, Textarea, and Select in a single API.
| Component | Renders | Best for |
|---|---|---|
Input | <input> | Single-line text entry of any type. Use this for 80% of form fields. |
TextField | <input> | <textarea> | <select> | When you want one import that covers all three. Use multiline prop for textarea mode, select prop for select mode. |
Textarea | <textarea> | Long-form text: bios, comments, project descriptions, code snippets. Supports resizable height. |
Select | <select> | Choosing one option from a fixed list. Pairs well with <option> children. For searchable lists, use Autocomplete instead. |
Autocomplete | Custom combobox | Large option lists (50+ items) where search-to-filter is required. Supports multi-select, free-text entry (freeSolo), and async loading. |
Large forms with many controlled inputs re-render on every keystroke. For most forms (under 20 fields) this is completely acceptable — React is fast enough to handle it without any optimization. However when performance becomes a concern (very large forms, forms inside long scrollable lists, forms in animation sequences) these techniques help:
Split state per field (avoid single object)
// ❌ Everything re-renders on any change
const [form, setForm] = useState({ name: '', email: ''})
// ✅ Only affected field re-renders
const [name, setName] = useState('')
const [email, setEmail] = useState('')Debounce onChange for async validation
import { useDeferredValue } from 'react'
const deferredEmail = useDeferredValue(email)
// Run server-side check against deferredEmail
// not against email directlyUse uncontrolled inputs for read-once fields
const nameRef = useRef<HTMLInputElement>(null)
function handleSubmit() {
console.log(nameRef.current?.value)
}
<Input label="Name" ref={nameRef} />Use React Hook Form for large forms
// React Hook Form re-renders only affected fields
// NOT the entire form on every keystroke
// It is uncontrolled under the hood with a thin wrapperThe TextField unifies outlined, filled, standard, error, multiline, and select modes. Use a single import and switch modes via props instead of importing different components per use-case.
This value is invalid
Use multiline for longer text
Select rendered from the same TextField wrapper
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label displayed for the text field. |
variant | 'outlined' | 'filled' | 'standard' | 'error' | 'outlined' | Visual variant of the field. |
placeholder | string | — | Placeholder text when empty. |
value | string | — | Controlled value. |
defaultValue | string | — | Default value for uncontrolled usage. |
onChange | (e: ChangeEvent) => void | — | Change event handler. |
helperText | string | — | Hint text shown below the field. |
error | string | — | Error message; activates error state. |
multiline | boolean | false | If true, renders a textarea instead of input. |
rows | number | — | Number of rows for multiline mode. |
select | boolean | false | If true, renders a select element. |
disabled | boolean | false | Disables the field. |
required | boolean | false | Marks field as required. |
fullWidth | boolean | false | Expands to fill container. |
Buttons, form controls, badges, alerts, cards, avatars, chips, and typography — the building blocks of every Alpha UI interface.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'contained' | 'outlined' | 'text' | 'contained' | Visual style of the button. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'primary' | Color palette applied to the button. |
size | 'small' | 'medium' | 'large' | 'medium' | Controls padding and font size. |
fullWidth | boolean | false | If true, the button expands to fill its container. |
disabled | boolean | false | If true, the button is non-interactive. |
isLoading | boolean | false | Shows a spinner and disables the button. |
startIcon | React.ReactNode | — | Element placed before the child label. |
endIcon | React.ReactNode | — | Element placed after the child label. |
href | string | — | If provided, renders the button as an anchor tag. |
onClick | (e: MouseEvent) => void | — | Click event handler. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Button label content. |
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'contained' | 'outlined' | 'text' | 'outlined' | Visual style applied to all child buttons. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'primary' | Color applied to the grouped buttons. |
size | 'small' | 'medium' | 'large' | 'medium' | Size applied uniformly to all buttons in the group. |
orientation | 'horizontal' | 'vertical' | 'horizontal' | Direction of the button group layout. |
disabled | boolean | false | Disables all buttons in the group. |
children* | React.ReactNode | — | Button elements to group together. |
| Prop | Type | Default | Description |
|---|---|---|---|
color | 'default' | 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'info' | 'default' | Color of the icon button. |
size | 'small' | 'medium' | 'large' | 'medium' | Controls the padding and icon size. |
disabled | boolean | false | If true, the button is non-interactive. |
edge | 'start' | 'end' | false | false | Adjusts horizontal margin for edge positioning. |
onClick | (e: MouseEvent) => void | — | Click event handler. |
children* | React.ReactNode | — | Icon to render inside the button. |
The FAB represents the primary action of a screen. Supports circular and extended variants with full color control.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'circular' | 'extended' | 'circular' | Use 'extended' to show label text alongside the icon. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'default' | 'primary' | Background color of the FAB. |
size | 'small' | 'medium' | 'large' | 'large' | Controls the size of the button. |
disabled | boolean | false | If true, the FAB is non-interactive. |
onClick | (e: MouseEvent) => void | — | Click event handler. |
children* | React.ReactNode | — | Icon or content to render inside the FAB. |
| Prop | Type | Default | Description |
|---|---|---|---|
value* | string | — | The value used when selected in a ToggleButtonGroup. |
selected | boolean | false | If true, the button appears in the selected/active state. |
disabled | boolean | false | If true, the button is non-interactive. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'primary' | Color palette for selected state. |
size | 'small' | 'medium' | 'large' | 'medium' | Button size. |
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | string[] | — | Currently selected value(s). Use array for multi-select. |
exclusive | boolean | false | If true, only one button can be selected at a time. |
onChange | (value: string | string[]) => void | — | Callback when selection changes. |
color | 'primary' | 'secondary' | 'success' | 'primary' | Color applied to selected buttons. |
size | 'small' | 'medium' | 'large' | 'medium' | Size applied to all child buttons. |
Flexible text input with label, helper text, error states, adornments, and all HTML input type support.
Full legal name.
This field is required.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label displayed above the input. |
type | string | 'text' | HTML input type (text, email, password, number, etc.). |
placeholder | string | — | Placeholder text shown when empty. |
value | string | — | Controlled value. |
defaultValue | string | — | Default value for uncontrolled usage. |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | — | Change event handler. |
helperText | string | — | Hint text shown below the input. |
error | string | — | Error message; sets the field into an error state. |
disabled | boolean | false | If true, the input is non-interactive. |
required | boolean | false | Marks the field as required. |
fullWidth | boolean | false | Expands the input to fill its container. |
startAdornment | React.ReactNode | — | Element displayed at the start of the input. |
endAdornment | React.ReactNode | — | Element displayed at the end of the input. |
Native select wrapper with label, helper text, validation states, and size variants.
Please select a value.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label above the select. |
value | string | — | Controlled selected value. |
defaultValue | string | — | Uncontrolled default selected value. |
onChange | (e: ChangeEvent<HTMLSelectElement>) => void | — | Change handler. |
helperText | string | — | Helper text below the select. |
error | string | — | Error message. |
disabled | boolean | false | Disables the select. |
required | boolean | false | Marks field as required. |
size | 'small' | 'medium' | 'medium' | Controls the select size. |
children* | React.ReactNode | — | Option elements. |
Multi-line text input with the same ergonomic API as Input — label, helper text, error states, and controlled/uncontrolled support.
Max 500 characters.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label above the textarea. |
value | string | — | Controlled value. |
defaultValue | string | — | Default value (uncontrolled). |
onChange | (e: ChangeEvent<HTMLTextAreaElement>) => void | — | Change handler. |
rows | number | 3 | Number of visible rows. |
placeholder | string | — | Placeholder text. |
helperText | string | — | Helper text below the field. |
error | string | — | Error message. |
disabled | boolean | false | Disables the field. |
required | boolean | false | Marks field as required. |
fullWidth | boolean | false | Expands to fill container. |
resize | 'none' | 'vertical' | 'horizontal' | 'both' | 'vertical' | CSS resize behavior. |
Date input primitive with label, helper text, validation states, and min/max date constraints.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label above the date input. |
value | string | — | Controlled date value (ISO string or YYYY-MM-DD). |
defaultValue | string | — | Default date value. |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | — | Change handler. |
helperText | string | — | Helper text shown below the input. |
error | string | — | Error message. |
disabled | boolean | false | Disables the field. |
required | boolean | false | Marks field as required. |
min | string | — | Minimum selectable date. |
max | string | — | Maximum selectable date. |
Accessible boolean toggle with optional label, description, and indeterminate state. Supports all semantic color variants.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label text next to the checkbox. |
description | string | — | Secondary description below the label. |
checked | boolean | — | Controlled checked state. |
defaultChecked | boolean | false | Default checked state (uncontrolled). |
indeterminate | boolean | false | If true, shows an indeterminate state. |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | — | Change handler. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'primary' | Accent color when checked. |
disabled | boolean | false | If true, the checkbox is non-interactive. |
size | 'small' | 'medium' | 'medium' | Controls box and icon size. |
Single-select option groups. Use RadioGroupItem for each option with label and optional description text.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled selected value. |
defaultValue | string | — | Default selected value (uncontrolled). |
onChange | (value: string) => void | — | Called when the selected option changes. |
name | string | — | Name attribute applied to all radio inputs. |
row | boolean | false | If true, options layout horizontally. |
children* | React.ReactNode | — | RadioGroupItem elements. |
Toggle control for boolean settings. Supports labels, descriptions, color variants, and controlled/uncontrolled usage.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label text next to the toggle. |
description | string | — | Secondary description below the label. |
checked | boolean | — | Controlled on/off state. |
defaultChecked | boolean | false | Default state (uncontrolled). |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | — | Change handler. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'primary' | Track color when on. |
disabled | boolean | false | If true, the switch is non-interactive. |
size | 'small' | 'medium' | 'medium' | Size of the toggle. |
Combobox input with searchable dropdown. Useful for filtering from large datasets with keyboard navigation support.
| Prop | Type | Default | Description |
|---|---|---|---|
options* | Array<{label: string; value: unknown}> | — | Array of selectable options. |
value | Option | null | — | Controlled selected option. |
onChange | (option: Option | null) => void | — | Callback when selection changes. |
label | string | — | Label above the combobox input. |
placeholder | string | — | Placeholder text. |
multiple | boolean | false | If true, allows multiple selections. |
disabled | boolean | false | Disables the control. |
loading | boolean | false | Shows a loading spinner in the dropdown. |
freeSolo | boolean | false | Allows arbitrary text values not in options list. |
Star-rating input with fractional precision support, read-only display mode, and customizable max stars.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | null | — | Controlled rating value. |
defaultValue | number | — | Default rating (uncontrolled). |
onChange | (value: number | null) => void | — | Callback with new rating. |
max | number | 5 | Maximum number of stars. |
precision | number | 1 | Minimum increment (e.g. 0.5 for half stars). |
size | 'small' | 'medium' | 'large' | 'medium' | Star icon size. |
readOnly | boolean | false | If true, the rating is display-only. |
disabled | boolean | false | If true, the rating is non-interactive. |
Range slider for numeric value selection. Supports controlled mode, step increments, marks, and range (dual-thumb) selection.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | number[] | — | Controlled slider value. Use array for range mode. |
defaultValue | number | number[] | — | Default value (uncontrolled). |
onChange | (value: number | number[]) => void | — | Callback with new value(s). |
min | number | 0 | Minimum allowed value. |
max | number | 100 | Maximum allowed value. |
step | number | 1 | Granularity of each step. |
color | 'primary' | 'secondary' | 'success' | 'primary' | Track and thumb color. |
disabled | boolean | false | If true, interaction is disabled. |
marks | boolean | Array<{value: number; label?: string}> | false | Show tick marks along the track. |
valueLabelDisplay | 'auto' | 'on' | 'off' | 'off' | Controls when the value label appears. |
orientation | 'horizontal' | 'vertical' | 'horizontal' | Slider orientation. |
Composable surface with variant support (elevated, outlined, filled) and optional hover lift effect.
System design and architecture
Deploying consistent UI primitives across 14 product teams.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'elevated'|'outlined'|'filled' | 'elevated' | Visual style of the card surface. |
hoverable | boolean | false | If true, adds hover lift/shadow effect. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | CardHeader, CardContent, CardFooter slots. |
Small semantic status indicators with color variants for default, primary, success, warning, danger, and info states.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default'|'primary'|'success'|'warning'|'danger'|'info' | 'default' | Semantic color variant. |
size | 'sm'|'md'|'lg' | 'md' | Badge size. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Badge label content. |
Informational callout with title and description primitives, close button support, and semantic color variants.
Your session is about to expire. Please save your work.
Your project has been successfully deployed to production.
Something went wrong. Please try again later.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'info'|'success'|'warning'|'error' | 'info' | Semantic color and icon variant. |
closable | boolean | false | If true, renders a dismiss button. |
onClose | () => void | — | Callback when dismissed. |
icon | React.ReactNode | — | Override the default icon. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Alert content (AlertTitle, AlertDescription). |
User identity component with image source, fallback initials, size variants, and grouped stacking with overflow count.
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | — | Image source URL. |
alt | string | — | Alt text for the image. |
size | 'xs'|'sm'|'md'|'lg'|'xl' | 'md' | Avatar diameter. |
variant | 'circular'|'rounded'|'square' | 'circular' | Shape of the avatar. |
className | string | — | Additional CSS classes. |
children | React.ReactNode | — | AvatarFallback element shown when image fails. |
| Prop | Type | Default | Description |
|---|---|---|---|
max | number | 5 | Maximum number of avatars before a +N overflow badge. |
total | number | — | Override the calculated total for the overflow badge. |
spacing | 'small' | 'medium' | 'medium' | Controls the overlap between avatars. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Avatar elements. |
Compact display and input tokens for selections, filters, and actions. Supports filled/outlined variants, avatar, icon, and delete button.
| Prop | Type | Default | Description |
|---|---|---|---|
label* | string | — | The text content of the chip. |
variant | 'filled'|'outlined' | 'filled' | Visual style of the chip. |
color | 'default'|'primary'|'secondary'|'success'|'error'|'warning'|'info' | 'default' | Chip color. |
size | 'small'|'medium' | 'medium' | Size of the chip. |
avatar | React.ReactNode | — | Avatar element for the start of the chip. |
icon | React.ReactNode | — | Icon element for the start of the chip. |
onDelete | () => void | — | If provided, shows a delete icon. |
onClick | () => void | — | Click handler (makes chip interactive). |
disabled | boolean | false | If true, chip is non-interactive. |
Standardized text routing primitive that maps semantic variants (h1–h6, subtitle, body, caption) to correct HTML tags and styles.
body2. Consectetur adipiscing elit.
caption. Important note| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'subtitle1'|'subtitle2'|'body1'|'body2'|'caption'|'overline'|'inherit' | 'body1' | Typographic style variant. |
color | 'primary'|'secondary'|'textPrimary'|'textSecondary'|'error'|'success'|'warning'|'info'|'inherit' | 'inherit' | Semantic color applied to the text. |
align | 'left'|'center'|'right'|'justify'|'inherit' | 'inherit' | Text alignment. |
gutterBottom | boolean | false | Adds margin-bottom. |
noWrap | boolean | false | Prevents text wrapping with ellipsis overflow. |
paragraph | boolean | false | If true, renders as a paragraph with margin. |
component | React.ElementType | — | Override the element type (polymorphic). |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Text content. |
Navigational anchor with customizable underline behavior and semantic color tokens that integrate with the Alpha UI theme.
| Prop | Type | Default | Description |
|---|---|---|---|
href* | string | — | URL the link navigates to. |
underline | 'always'|'hover'|'none' | 'hover' | Underline display behavior. |
color | 'primary'|'secondary'|'info'|'error'|'success'|'textPrimary'|'textSecondary' | 'primary' | Link text color. |
target | string | — | HTML target attribute (e.g. "_blank"). |
rel | string | — | HTML rel attribute. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Link content. |
Container, grid, navbar, sidebar, stack, and overlay panels structure entire product surfaces with reusable layout primitives.
The foundational layout building block. Polymorphic via the 'as' prop — renders any HTML element while accepting all class utilities.
| Prop | Type | Default | Description |
|---|---|---|---|
as | keyof JSX.IntrinsicElements | React.ComponentType | 'div' | Polymorphic element type to render. |
className | string | — | Additional CSS classes for styling. |
children | React.ReactNode | — | Content rendered inside the box. |
Centers content horizontally with a configurable max-width breakpoint. The most basic responsive layout element.
Centered Container Content (Medium)
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'lg' | Max-width breakpoint of the container. |
disableGutters | boolean | false | Removes horizontal padding. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Container content. |
Flexible CSS grid utility with column count, gap, and optional responsive collapse to single column on small screens.
| Prop | Type | Default | Description |
|---|---|---|---|
columns | number | 12 | Number of grid columns. |
gap | 'none' | 'sm' | 'md' | 'lg' | 'md' | Gap between grid cells. |
responsive | boolean | false | If true, collapses to 1 column on mobile. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Grid cell elements. |
The Stack component manages immediate children layout along the vertical or horizontal axis. Divider establishes thematic boundaries between sections.
| Prop | Type | Default | Description |
|---|---|---|---|
direction | 'row' | 'column' | 'row-reverse' | 'column-reverse' | 'column' | Flex direction of the stack. |
spacing | number | string | 0 | Gap between children (CSS gap or Tailwind scale). |
divider | React.ReactNode | — | Element inserted between each child. |
alignItems | string | — | CSS align-items value. |
justifyContent | string | — | CSS justify-content value. |
flexWrap | 'nowrap' | 'wrap' | 'wrap-reverse' | 'nowrap' | Controls wrapping. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Items to stack. |
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | 'horizontal' | 'vertical' | 'horizontal' | Direction of the dividing line. |
flexItem | boolean | false | Use when Divider is inside a flex container. |
variant | 'fullWidth' | 'inset' | 'middle' | 'fullWidth' | Indentation style. |
textAlign | 'left' | 'center' | 'right' | 'center' | Position of optional label text. |
children | React.ReactNode | — | Optional text or element rendered on the divider. |
Standardized top application bar for branding and actions. Toolbar wraps content with consistent gutters and alignment.
| Prop | Type | Default | Description |
|---|---|---|---|
position | 'fixed' | 'absolute' | 'sticky' | 'static' | 'relative' | 'fixed' | CSS positioning strategy. |
color | 'primary' | 'secondary' | 'neutral' | 'transparent' | 'primary' | Background color theme. |
elevation | number | 4 | Shadow depth (0 = flat). |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Content, usually a Toolbar. |
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'regular' | 'dense' | 'regular' | Use 'dense' for compact layouts. |
disableGutters | boolean | false | Removes horizontal padding. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Toolbar content. |
| Prop | Type | Default | Description |
|---|---|---|---|
position | 'fixed' | 'sticky' | 'static' | 'fixed' | CSS positioning strategy. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Navbar content. |
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'permanent' | 'persistent' | 'temporary' | 'permanent' | Display behavior of the sidebar. |
open | boolean | true | Controls open/closed state in persistent/temporary modes. |
onClose | () => void | — | Callback to close the sidebar. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Sidebar content. |
Elevated surfaces that translate physical material depths into UI containers. Control depth with the elevation prop (0–24).
| Prop | Type | Default | Description |
|---|---|---|---|
elevation | number | 1 | Shadow depth (0–24). Higher values produce deeper shadows. |
variant | 'elevation' | 'outlined' | 'elevation' | Use 'outlined' for a border-based style without shadow. |
square | boolean | false | If true, removes border radius. |
className | string | — | Additional CSS classes. |
children | React.ReactNode | — | Content rendered inside the Paper surface. |
Sliding overlay panel for secondary navigation or settings. Supports left, right, top, and bottom anchors.
| Prop | Type | Default | Description |
|---|---|---|---|
open* | boolean | — | Controls whether the drawer is visible. |
onClose* | () => void | — | Callback invoked when the user clicks the backdrop. |
anchor | 'left' | 'right' | 'top' | 'bottom' | 'left' | Edge of the screen from which the drawer appears. |
variant | 'temporary' | 'persistent' | 'permanent' | 'temporary' | Display behavior of the drawer. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Drawer content. |
| Prop | Type | Default | Description |
|---|---|---|---|
separator | React.ReactNode | '/' | Separator element between breadcrumb items. |
maxItems | number | 8 | Collapsible item count before ellipsis appears. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Breadcrumb link/text elements. |
Continuous vertical indexes of text or images. Supports icons, avatars, secondary text, and interactive button items.
Overview of all services
Last updated 2m ago
| Prop | Type | Default | Description |
|---|---|---|---|
dense | boolean | false | Reduces item padding for compact layouts. |
disablePadding | boolean | false | Removes list padding. |
subheader | React.ReactNode | — | Sticky subheader element. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | ListItem, ListSubheader elements. |
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Controlled selected action index. |
onChange | (value: number) => void | — | Callback when selection changes. |
showLabels | boolean | false | If true, labels are always visible. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | BottomNavigationAction elements. |
A layout that packs elements into an optimal vertical stack without gaps, ideal for mixed-height content like photo grids.
| Prop | Type | Default | Description |
|---|---|---|---|
columns | number | 4 | Number of masonry columns. |
spacing | number | 4 | Gap between items (Tailwind gap scale). |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Items to layout in masonry grid. |
| Prop | Type | Default | Description |
|---|---|---|---|
up | 'sm' | 'md' | 'lg' | 'xl' | — | Hides content at this breakpoint and above. |
down | 'sm' | 'md' | 'lg' | 'xl' | — | Hides content at this breakpoint and below. |
only | 'sm' | 'md' | 'lg' | 'xl' | — | Hides content only at this breakpoint. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | Content to show/hide. |
Dialogs, menus, tabs, accordions, tooltips, transitions, and notifications — all with variant and state control APIs.
Layered dialog for confirmation and focused tasks. Supports multiple sizes, ESC close, overlay click dismiss, and animated entry.
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen* | boolean | — | Controls visibility of the modal. |
onClose* | () => void | — | Callback to close the modal. |
size | 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'md' | Width of the modal dialog. |
closeOnOverlayClick | boolean | true | Whether clicking the backdrop closes the modal. |
closeOnEsc | boolean | true | Whether pressing Escape closes the modal. |
className | string | — | Additional CSS classes for the modal container. |
children* | React.ReactNode | — | Modal content (ModalContent, ModalHeader, etc.). |
High-level modal abstraction for standard confirmation and information dialogs. A specialized wrapper over Modal.
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen* | boolean | — | Controls visibility of the dialog. |
onClose* | () => void | — | Callback to close the dialog. |
maxWidth | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'sm' | Maximum width of the dialog. |
fullWidth | boolean | false | If true, dialog takes the full max-width. |
children* | React.ReactNode | — | Dialog components: DialogTitle, DialogContent, DialogActions. |
Contextual action menu for navigation or localized controls. Supports keyboard navigation and destructive action styles.
Segment content into interactive tabbed views. Supports controlled and uncontrolled modes, horizontal and vertical orientations.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled active tab value. |
defaultValue | string | — | Default active tab (uncontrolled). |
onValueChange | (value: string) => void | — | Callback when active tab changes. |
orientation | 'horizontal' | 'vertical' | 'horizontal' | Tab list direction. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | TabsList and TabsContent elements. |
Progressive disclosure UI for grouped content. Supports single and multiple open modes with full keyboard navigation.
| Prop | Type | Default | Description |
|---|---|---|---|
type | 'single' | 'multiple' | 'single' | Controls whether one or multiple items can open simultaneously. |
value | string | string[] | — | Controlled open item(s). |
defaultValue | string | string[] | — | Default open item(s) (uncontrolled). |
onValueChange | (value: string | string[]) => void | — | Callback when open state changes. |
collapsible | boolean | false | If true (single mode), active item can be collapsed. |
className | string | — | Additional CSS classes. |
Hover/focus helper content with automatic placement adjustment. Supports top, bottom, left, right positions.
| Prop | Type | Default | Description |
|---|---|---|---|
content* | React.ReactNode | — | Content displayed in the tooltip. |
position | 'top' | 'bottom' | 'left' | 'right' | 'top' | Preferred placement of the tooltip. |
delay | number | 0 | Delay in ms before tooltip appears. |
disabled | boolean | false | If true, the tooltip is not shown. |
children* | React.ReactNode | — | Element that triggers the tooltip. |
Dimming overlays for focused interactions. Used as the foundation layer for modals, drawers, and dialogs.
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen* | boolean | — | Controls backdrop visibility. |
onClick | () => void | — | Callback when backdrop is clicked. |
className | string | — | Additional CSS classes. |
Transient system feedback via toast notifications. Use the useToast hook to trigger success, error, warning, and info toasts.
Global elevated notifications at the bottom of the screen for process feedback. Auto-dismisses after a configurable duration.
| Prop | Type | Default | Description |
|---|---|---|---|
open* | boolean | — | Controls snackbar visibility. |
message | string | — | Message text to display. |
onClose | () => void | — | Callback when the snackbar closes. |
autoHideDuration | number | null | 6000 | Auto-dismiss delay in ms. null to disable. |
anchorOrigin | {vertical: "top"|"bottom", horizontal: "left"|"center"|"right"} | {vertical:'bottom',horizontal:'left'} | Screen position of the snackbar. |
action | React.ReactNode | — | Optional action button. |
When pressed, a floating action button displays 3–6 related actions. Use direction to control expansion orientation.
| Prop | Type | Default | Description |
|---|---|---|---|
icon* | React.ReactNode | — | Icon displayed in the main FAB trigger. |
direction | 'up' | 'down' | 'left' | 'right' | 'up' | Direction in which actions expand. |
color | 'primary' | 'secondary' | 'success' | 'primary' | Color of the main FAB. |
open | boolean | — | Controls open state (controlled mode). |
onOpen | () => void | — | Callback when the dial opens. |
onClose | () => void | — | Callback when the dial closes. |
| Prop | Type | Default | Description |
|---|---|---|---|
icon* | React.ReactNode | — | Icon to display in the action button. |
tooltipTitle | string | — | Tooltip label shown on hover. |
onClick | () => void | — | Click handler for this action. |
Placeholder loading state graphics for better perceived performance. Supports text, rectangular, and circular variants.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'text' | 'rectangular' | 'circular' | 'text' | Shape of the skeleton placeholder. |
width | number | string | — | Width of the skeleton. |
height | number | string | — | Height of the skeleton. |
animation | 'pulse' | 'wave' | false | 'pulse' | Animation style. false disables animation. |
className | string | — | Additional CSS classes. |
Circular and linear loading bars for task feedback. Supports determinate (with value) and indeterminate animations.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'linear' | 'circular' | 'linear' | Shape of the progress indicator. |
value | number | — | Progress percentage (0–100). Omit for indeterminate. |
color | 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'primary' | Indicator color. |
size | number | 40 | Diameter (circular variant only, in px). |
thickness | number | 3.6 | Stroke width (circular variant only). |
className | string | — | Additional CSS classes. |
Smooth entry/exit animations for any content: Fade, Zoom, Slide, and Grow. All wrap children and accept an 'in' boolean prop.
Table, timeline, pagination, stepper, and tree view primitives cover structured data, chronological events, and step-by-step workflows.
Semantic data table primitives (TableHeader, TableRow, TableHead, TableBody, TableCell) for structured content display.
| Asset | Status | Value |
|---|---|---|
| Bitcoin | Active | $64,231.00 |
| Ethereum | Pending | $3,420.50 |
| Prop | Type | Default | Description |
|---|---|---|---|
stickyHeader | boolean | false | If true, the header row sticks to the top while scrolling. |
size | 'small' | 'medium' | 'medium' | Controls cell padding density. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | TableHeader, TableBody, TableFooter elements. |
Chronological visual event paths for logging or history tracking. Supports dot colors, variants, and connector lines.
| Prop | Type | Default | Description |
|---|---|---|---|
position | 'left' | 'right' | 'alternate' | 'right' | Content alignment relative to the timeline axis. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | TimelineItem elements. |
| Prop | Type | Default | Description |
|---|---|---|---|
color | 'primary' | 'secondary' | 'success' | 'error' | 'grey' | 'grey' | Color of the dot marker. |
variant | 'filled' | 'outlined' | 'filled' | Visual style of the dot. |
className | string | — | Additional CSS classes. |
Page navigation controls for long datasets with active state, previous/next chevrons, and keyboard support.
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | — | Total number of pages. |
page | number | — | Controlled current page (1-indexed). |
defaultPage | number | 1 | Default page (uncontrolled). |
onChange | (page: number) => void | — | Callback when page changes. |
color | 'primary' | 'secondary' | 'primary' | Active item color. |
size | 'small' | 'medium' | 'large' | 'medium' | Link size. |
disabled | boolean | false | Disables all navigation. |
className | string | — | Additional CSS classes. |
Step-by-step progress indicator for complex multi-stage workflows. Supports vertical (default) and horizontal orientation.
Security
Config
Deploy
| Prop | Type | Default | Description |
|---|---|---|---|
activeStep* | number | — | Index of the currently active step (0-based). |
orientation | 'horizontal' | 'vertical' | 'vertical' | Layout direction of the steps. |
alternativeLabel | boolean | false | Labels appear below step icons (horizontal only). |
nonLinear | boolean | false | Allows navigating to any step in any order. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | StepperItem elements. |
Hierarchical folder-like tree structures for nested data navigation. Supports expand/collapse, single/multi select.
| Prop | Type | Default | Description |
|---|---|---|---|
defaultExpanded | string[] | [] | Node IDs expanded by default. |
selected | string | string[] | — | Controlled selected node(s). |
multiSelect | boolean | false | If true, multiple nodes can be selected. |
onNodeSelect | (nodeId: string) => void | — | Callback when a node is selected. |
onNodeToggle | (nodeId: string) => void | — | Callback when a node is expanded/collapsed. |
className | string | — | Additional CSS classes. |
children* | React.ReactNode | — | TreeItem elements. |
Shuttle list for moving one or more items between two independent collection sets. Includes basic and enhanced selection with Move All support.
Includes move-selected and move-all actions, matching the classic transfer-list pattern from MUI.
Choices
Chosen
| Prop | Type | Default | Description |
|---|---|---|---|
items* | Array<{value: string; label: string}> | — | Complete pool of available items. |
value | string[] | — | Controlled list of selected (right-side) item values. |
defaultValue | string[] | [] | Default selected items (uncontrolled). |
onChange | (selected: string[]) => void | — | Callback with updated selected values. |
leftTitle | string | Choices | Title of the source (left) list. |
rightTitle | string | Chosen | Title of the destination (right) list. |
showMoveAll | boolean | false | Shows Move All / Remove All buttons. |
showSelectAll | boolean | false | Shows Select All checkboxes in list headers. |
Everything currently available from the package, grouped by purpose.
Action button with variants, sizes, and loading states.
Groups buttons logically with shared borders.
Icon action buttons in circular bounds.
Toggable button inputs serving as complex radios.
Floating Action Button for primary actions.
Text field with labels, helper text, and validation states.
Unified input wrapper supporting multiline and select modes.
Multi-line input with the same ergonomic API as Input.
Native select wrapper with size and status variants.
Date input primitive with label, helper text, and validation states.
Accessible checkbox with optional label and description.
Single-select option groups with keyboard-friendly semantics.
Toggle control for boolean settings with labels and descriptions.
Composable surface with header, content, and footer slots.
Small status indicators for labels and states.
Informational callout with title and description primitives.
User identity component with image and fallback support.
Standardized text routing primitive.
Navigational anchor with custom underlines.
Compact display and input token elements.
Star-rating input component.
Range slider input component.
Combobox input with searchable options.
Stack multiple avatars together with overlapping offset.
Polymorphic utility wrapper for flexible styling.
Standardized top app bar for branding and navigation.
Content wrapper for headers with consistent alignment.
Responsive layout wrapper for page-level sections.
Flexible grid utility component for aligned layouts.
Composable top navigation structure with brand and links.
Sidebar container with sectioned navigation items.
Sliding overlay panel.
Hierarchical navigation path indicators.
Elevated surfaces translating physical depths.
Robust continuous and interactive item systems.
Mobile sticky navigation controls.
Flexbox column/row wrapper.
Horizontal and vertical separation lines.
Packs elements into an optimal vertical stack without gaps.
Responsive utility for manual breakpoint visibility control.
Layered dialog for confirmation and focused tasks.
Higher-level modal abstraction for standard dialog layouts.
Compact action menu for contextual controls.
Dedicated dropdown menu for action lists.
Segment content into interactive tabbed views.
Progressive disclosure UI for grouped content.
Hover/focus helper content with placement options.
Dimming overlays for focused interactions.
Transient system feedback via toast notifications.
Global-level transient notifications for user feedback.
Expanding menu attached to a FAB.
Placeholder loading state graphics.
Circular and linear loading bars.
Parity animation wrappers: Fade, Zoom, Slide, Grow.
Semantic data table primitives for structured content.
Chronological visual event paths.
Page navigation controls for long datasets.
Step-by-step progress indicator with current state.
Move one or more items between lists with selectable transfer actions.
Hierarchical folder-like tree structures.