# CodedDesign for agents
Cartoon React design system. Package: @kenselasie/codeddesign 0.1.5
Catalog: this repo. Public npm. Do not use GitHub Packages.
## Install
npm install @kenselasie/codeddesign
Peers: react@^19, react-dom@^19, @stylexjs/stylex@0.19.1
## Skill
Same SKILL.md for every coding agent (Cursor, Claude, Codex, and others). Copy it into codeddesign/SKILL.md under the agent's skills folder:
- .agents/skills/codeddesign/
- .cursor/skills/codeddesign/
- .claude/skills/codeddesign/
- .codex/skills/codeddesign/
## First render
```tsx
import "@kenselasie/codeddesign/styles.css";
import { Button } from "@kenselasie/codeddesign";
```
The consuming app does not need the StyleX compiler to render components.
## Theme
```tsx
import * as stylex from "@stylexjs/stylex";
import { darkTheme, palettes } from "@kenselasie/codeddesign/theme";
{children}
{children}
import { markerPalettes, markerType, markerRadii, markerStroke, markerShadows } from "@kenselasie/codeddesign/theme";
{children}
import { edwaPalettes, edwaType, edwaRadii, edwaStroke, edwaShadows } from "@kenselasie/codeddesign/theme";
{children}
```
Worlds: codedcartoony, codedmarker, codededwadzi.
CodedCartoony palettes: paper, nord, solarized, catppuccin.
CodedMarker palettes: highlighter, magenta, cyan, amber.
CodedEdwadzi palettes: coastal, coral, forest, sand. Each palette has light and dark.
Fonts: Fredoka in codedcartoony; Archivo 900 in codedmarker; Fraunces in codededwadzi; Nunito in codedcartoony; Archivo in codedmarker; Inter + JetBrains Mono in codededwadzi.
Ink #2a2438 on paper #fff7ef. Radii: s 10px, m 16px, l 22px, pill.
Space: xxs 4, xs 8, s 12, m 16, l 24, xl 32, xxl 48. Shadows: codedcartoony: offset + blur (s1–s4). codedmarker: hard ink offset, no blur. codededwadzi: soft editorial blur..
Color roles: background, white, black, steel, concrete, blue, blueLight, blueDark, whale, whaleLight, whaleDark, smoke, smokeDark, smokeDarker, snow, snowDark, snowDarker, success, danger, dangerDark, warning, warningDark, green, greenLight, greenDark, turquoise, turquoiseLight, turquoiseDark, pink, pinkLight, pinkDark, onAccent, onPastel, well, onWell.
Icon names: check, x, search, info, alert, chevron, chevronLeft, chevronRight, plus, minus, copy, calendar, paperclip, file, image, more, menu, terminal, globe, message, user, settings, home, grid, compass, wallet, help, logout, book, document, checkCircle, xCircle, upload, download, arrowUpRight, branch, spark, grip.
## System design
Compose product UIs — social, dashboards, settings, onboarding — from tokens, atoms, molecules, and recipes. Surfaces below are the customization contract for humans and agents.
## Layers
### Tokens
Color, type, space, radii, shadows. Remap with worlds and palettes from @kenselasie/codeddesign/theme.
### Atoms
Single-purpose controls: Button, TextField, Icon, Tag, Avatar, Checkbox, Toggle, Link.
### Molecules
Small compositions: Card + CardHeader, Item + ItemGroup, SearchInput, ToggleButton, Step, InputGroup.
### Recipes
Copy-paste screens from @kenselasie/codeddesign/agent recipes. Prefer a recipe before inventing a layout.
### Product shells
Full surfaces below. Pass data and callbacks as props. Swap tone with a world/palette, not CSS rewrites.
## Surfaces
### Split hero
Split layout: configure on one side, live preview on the other. Mode chips drive fields and CTA copy.
Compose:
- Heading + Body
- ToggleButton or Button selected for mode chips
- TextField (and DatePicker when needed)
- Button variant="primary" for the dynamic CTA
- Link for secondary action
- Card (or AspectRatio frame) for the preview pane
- Sticker or Tag for a URL or status chip
Customize:
- modes: { label, value }[] for chips
- fields: change with selected mode
- ctaLabel: string built from inputs
- preview: ReactNode — canvas, poster, or empty state
- world/palette on the shell for global look
Recipe id: `split-hero`
### Process steps
Numbered process row of cards with title, description, and footer label.
Compose:
- Heading + Body for the section intro
- Grid of Card with CardTitle + CardContent
- Step for linear progress elsewhere; here prefer Card + large Title for the step number
Customize:
- steps: { number, title, description, footerLabel }[]
- columns via Grid
Recipe id: `process-steps`
### Activity dashboard
Feature or stat cards plus a recent-activity list with avatars and status tags.
Compose:
- Heading + Body + feature Grid of Card
- Button primary for CTA
- Card with stats (Heading + Body — do not nest Card)
- ItemGroup + Item for activity rows
- Avatar + Tag for status
Customize:
- stats: { label, value, delta }[]
- items: { name, meta, status, initials }[]
- status → Tag status or Status component
Recipe id: `activity-dashboard`
### Feature grid
Section of value cards with icon, title, and short body.
Compose:
- Heading + Body
- Grid of Card: Icon + CardTitle + CardContent
Customize:
- items: { title, description, icon }[]
- 2–3 columns on desktop via Grid
Recipe id: `feature-grid`
### Create account
Centered auth form with account-type toggle, optional SSO, email fields, and primary submit.
Compose:
- Heading + Body with Link
- ToggleButton for Personal / Team
- Button default fullWidth for a generic SSO action
- TextField stack + Checkbox
- Button variant="primary" fullWidth
Customize:
- accountTypes via ToggleButton options
- showSso: boolean
- fields and validation stay on TextField
Recipe id: `signup`
### Detail cards
Two-column detail cards: about, key-value basics, checklist, media slot.
Compose:
- Heading
- Grid of Card
- About: CardTitle + Body
- Basics: stacked Inline or Item rows for key/value
- Checklist: Icon checkCircle / empty + Status
- Media: CardTitle + AspectRatio frame for image or map slot
Customize:
- about: string
- basics: { label, value }[]
- checks: { label, detail?, done: boolean }[]
- media: ReactNode slot
Recipe id: `detail-cards`
### App shell
Sidebar rail + top search + main page with tabs and empty state.
Compose:
- AppSidebar with brand, nav groups, create action, and sign out
- SearchInput hideLabel shape="pill" in the header
- Heading + Tabs
- EmptyState when a tab has nothing
Customize:
- nav: AppSidebar items
- tabs: value/label pairs
- empty: title + description per tab
Recipe id: `app-shell`
## Rules
- Customize with props and children first. Do not copy component source into the app.
- Change look globally with a world + palette from @kenselasie/codeddesign/theme, not one-off hex in screens.
- Pick one world: codedcartoony, codedmarker, or codededwadzi. Do not mix.
- Prefer an existing atom or molecule over custom HTML for buttons, fields, chips, tags, tables, and empty states.
- ToggleButton is the segmented control (Personal / Team, modes as a compact group). For pill chips that look like tags, use Button selected or Tag.
- SearchInput is fluid. In a header or rail: hideLabel and shape="pill".
- Card has CardHeader, CardTitle, CardContent, CardActions — compose, do not nest Card inside Card.
- Do not nest Form or MessageScroller inside Card.
- Do not invent props. Read flattenReference() or package types.
- Pass ReactNode slots (preview, media) instead of baking third-party widgets into the design system.
## Rules
- Import styles.css once at the app root so Fredoka, Nunito, Archivo, Fraunces, Inter, JetBrains Mono, and tokens land.
- Import components from @kenselasie/codeddesign. Do not copy source files into the app.
- Pick one world. codedcartoony: Fredoka, Nunito, plush shadows. codedmarker: Archivo, hard ink shadows, neon blocks. codededwadzi: Fraunces, Inter, JetBrains Mono, soft teal/coral paper. Do not mix them or restyle toward shadcn/ui or Ant Design.
- The consuming app does not need the StyleX compiler to render components.
- Theme with stylex.props from @kenselasie/codeddesign/theme. codedcartoony palettes: paper, nord, solarized, catppuccin. codedmarker: highlighter, magenta, cyan, amber (+ markerType/radii/stroke/shadows). codededwadzi: coastal, coral, forest, sand (+ edwaType/radii/stroke/shadows). Worlds remap tokens only — do not hardcode one world’s chrome into shared components.
- Prefer an existing component over custom HTML for buttons, fields, dialogs, tables, and chat.
- Do not nest interactive controls inside links.
- Do not nest Card, Form, or MessageScroller inside another card.
- SearchInput is fluid. In a sidebar or toolbar use hideLabel and shape="pill".
- Each export has a catalog page at /components/{id} with live display, recipe, and props. Compose from the package, not from scraping that page.
- Do not invent APIs. If a prop is unknown, omit it or read flattenReference() / package types.
- For product layouts, follow systemDesign surfaces (split hero, process steps, activity dashboard, feature grid, signup, detail cards, app shell). Customize with props and slots.
## Machine index
```ts
import {
agentGuide,
recipes,
components,
reference,
flattenReference,
systemDesign,
toSystemDesignMarkdown,
toLlmsTxt,
agentPrompt,
} from "@kenselasie/codeddesign/agent";
```
## Recipes (copy these)
### Sign-in
Email sign-in with a primary submit.
```tsx
import { Form, TextField, Button, FormActions } from "@kenselasie/codeddesign";
```
### Data table
Sortable rows of string records.
```tsx
import { DataTable } from "@kenselasie/codeddesign";
```
### Chat
Assistant and user messages in a scroller.
```tsx
import { Message, MessageScroller } from "@kenselasie/codeddesign";
How can I help you today?
Show me the overview.
```
### Empty
A screen with nothing to show yet.
```tsx
import { EmptyState, Button } from "@kenselasie/codeddesign";
Clear filters}
/>
```
### Saved
Inline success or warning after an action.
```tsx
import { Alert } from "@kenselasie/codeddesign";
Your changes are up to date.
```
### Settings tabs
Switch panels in a settings or account screen.
```tsx
import { Tabs, TabList, Tab, TabPanel, Body } from "@kenselasie/codeddesign";
AccountBilling
Profile, password, and sessions.
Invoices and payment methods.
```
### Split hero
Configure on one side, live preview on the other. Mode chips, fields, and a primary CTA.
```tsx
import {
Body,
Button,
Card,
CardContent,
CardHeader,
CardTitle,
Heading,
Link,
Stack,
Sticker,
TextField,
ToggleButton,
} from "@kenselasie/codeddesign";
const [mode, setMode] = useState("project");
Start something new.
Name it, pick a mode, and see a live preview as you type.
Browse templates
previewMy projectLive preview slot — pass your content as children.
```
### Process steps
Numbered process cards with title, description, and a short footer label.
```tsx
import { Body, Card, CardContent, CardTitle, Grid, Heading, Stack, Title } from "@kenselasie/codeddesign";
const steps = [
{ number: "01", title: "Capture", description: "Collect the inputs you need.", footer: "INPUT" },
{ number: "02", title: "Review", description: "Check, edit, and approve.", footer: "CHECK" },
{ number: "03", title: "Share", description: "Invite the people who matter.", footer: "TEAM" },
{ number: "04", title: "Ship", description: "Publish or hand off the result.", footer: "DONE" },
];
From first draft to done.
{steps.map((step) => (
{step.number}{step.title}{step.description}
{step.footer}
))}
```
### Activity dashboard
Stat cards plus a recent-activity list with avatars and status tags.
```tsx
import {
Avatar,
Body,
Button,
Card,
CardContent,
CardHeader,
CardTitle,
Grid,
Heading,
Item,
ItemGroup,
Stack,
Tag,
} from "@kenselasie/codeddesign";
This week at a glance.Active usersPeople who opened the app in the last 7 days.Open tasksWork still waiting on a decision.Recent activity128 sessions
↑ 12% vs last week
36 tasks done
↑ 8%
}
actions={Done}
/>
}
actions={New}
last
/>
```
### Feature grid
Value cards with icon, title, and short description.
```tsx
import { Card, CardContent, CardTitle, Grid, Heading, Icon, Stack } from "@kenselasie/codeddesign";
const features = [
{ title: "Fast to ship", icon: "spark" as const, body: "Compose screens from recipes, not blank canvases." },
{ title: "Clear by default", icon: "checkCircle" as const, body: "Readable type, honest empty states, obvious CTAs." },
{ title: "One system", icon: "grip" as const, body: "Same controls for social, dashboards, and settings." },
];
Why teams reach for it
{features.map((item) => (
{item.title}{item.body}
))}
```
### Create account
Account-type toggle, optional SSO, email fields, primary submit.
```tsx
import {
Body,
Button,
Checkbox,
Heading,
Link,
Stack,
TextField,
ToggleButton,
} from "@kenselasie/codeddesign";
const [accountType, setAccountType] = useState("personal");
Create your account
Already have one? Sign in
Email me product updates
```
### Detail cards
About, key-value basics, checklist status, and a media or map slot.
```tsx
import {
Body,
Card,
CardContent,
CardTitle,
Grid,
Heading,
Icon,
Inline,
Stack,
Status,
} from "@kenselasie/codeddesign";
DetailsAboutProduct design for teams that ship weekly.Checklist
Email verified
Done
Two-factor auth
Not yetThe basics
Timezone
UTC
MediaSlot — pass an image, map, or embed as children.
```
### App shell
Grouped sidebar, primary create action, footer utilities, and a content pane.
```tsx
import { AppSidebar } from "@kenselasie/codeddesign";
{}}
/>
```
### Forms
Sign-in, profile, and invite forms composed from Form, fields, and actions.
```tsx
import {
Form,
FormActions,
FormRow,
TextField,
TextArea,
Select,
Switch,
Checkbox,
Button,
} from "@kenselasie/codeddesign";
```
## Components
### General
#### Button
Import: `Button`
Use: Actions. Primary for the one next step.
Live: /components/button
Props:
- `variant`: "default" | "primary" | "subtle" | "danger" | "dangerSubtle" | "ghost" | "ghostSubtle" · default "default"
- `size`: "small" | "medium" | "large" · default "medium"
- `isPending`: boolean · default false
- `selected`: boolean · default false
- `fullWidth`: boolean · default false
- `isIconButton`: boolean · default false
- `disabled`: boolean
- `type`: "button" | "submit" | "reset" · default "button"
- `children`: ReactNode · required
Example:
```tsx
```
#### SpeedDial
Import: `SpeedDial`
Use: A plus button that fans out labeled actions.
Live: /components/speed-dial
Props:
- `actions`: { label: string; onClick: () => void }[] · required
Example:
```tsx
```
#### Icon
Import: `Icon`
Use: Stroke icons. Name must be an IconName.
Live: /components/icon
Props:
- `name`: IconName · required · check, x, search, info, alert, chevron, chevronLeft, chevronRight, plus, minus, copy, calendar, paperclip, file, image, more, menu, terminal, globe, message, user, settings, home, grid, compass, wallet, help, logout, book, document, checkCircle, xCircle, upload, download, arrowUpRight, branch, spark, grip
- `size`: number · default 16
Example:
```tsx
```
#### Logo
Import: `Logo`
Use: CodedDesign wordmark or square mark. Use decorative inside a named link. Pass your own brand marks in the app — do not bake third-party logos into the system.
Live: /components/logo
Props:
- `wordmark`: boolean · default false · Full coded / DESIGN. lockup
- `size`: "sm" | "md" | "lg" · default "md"
- `decorative`: boolean · default false
Example:
```tsx
```
#### Typography
Import: `Heading, Title, Body, Description, Detail, Code, Bullet`
Use: Display face for Heading/Title (Fraunces in CodedEdwadzi, Fredoka in CodedCartoony). Body uses the UI face (Inter / Nunito).
Live: /components/typography
Props:
- `Heading.size`: "xxxl" | "xxl" | "xl" | "l" | "m" | "s" · default "xl"
- `Heading.align`: "left" | "center" | "right" · default "left"
- `Heading.withoutMargins`: boolean · default false
- `Title.size`: "xl" | "l" | "m" | "s" · default "l"
- `Body.size`: "l" | "m" | "s" · default "m"
Example:
```tsx
Docs
Reading copy.
```
#### Sticker
Import: `Sticker`
Use: Tilted cartoon label. Text on pastel uses onPastel.
Live: /components/sticker
Props:
- `tone`: "pink" | "blue" | "yellow" | "mint" · default "pink"
- `children`: ReactNode · required
Example:
```tsx
Sample
```
#### Link
Import: `Link`
Use: Inline text link. Do not nest buttons inside it.
Live: /components/link
Props:
- `children`: ReactNode · required
- `...anchor`: AnchorHTMLAttributes
Example:
```tsx
Components
```
### Layout
#### Stack / Inline
Import: `Stack, Inline`
Use: Stack is a column. Inline is a wrapping row.
Live: /components/stack
Props:
- `gap`: "xxs" | "xs" | "s" | "m" | "l" | "xl" · default Stack "m", Inline "s"
- `children`: ReactNode · required
Example:
```tsx
TitleCopy
```
#### Grid / GridItem
Import: `Grid, GridItem`
Use: Equal columns. Wrap cells in GridItem.
Live: /components/grid
Props:
- `columns`: number · default 3
- `gap`: "xs" | "s" | "m" | "l" · default "m"
Example:
```tsx
LeftRight
```
#### Spacer
Import: `Spacer`
Use: Empty gap using space tokens.
Live: /components/spacer
Props:
- `size`: "xxs" | "xs" | "s" | "m" | "l" | "xl" · default "m"
Example:
```tsx
```
#### Divider
Aliases: Separator
Import: `Divider`
Use: Horizontal rule.
Live: /components/divider
Example:
```tsx
```
#### Resizable
Import: `Resizable`
Use: Two panes with a drag handle.
Live: /components/resizable
Props:
- `left`: ReactNode · required
- `right`: ReactNode · required
Example:
```tsx
} right={} />
```
#### ScrollArea
Import: `ScrollArea`
Use: Clipped scrolling well.
Live: /components/scroll-area
Props:
- `children`: ReactNode · required
Example:
```tsx
{longList}
```
#### AspectRatio
Import: `AspectRatio`
Use: Locks a box to a ratio.
Live: /components/aspect-ratio
Props:
- `ratio`: number · default 16 / 9
- `children`: ReactNode · required
Example:
```tsx
```
#### Overlay
Import: `Overlay`
Use: Dimmed layer. Drawers and dialogs already include one.
Live: /components/overlay
Props:
- `onClick`: () => void
- `children`: ReactNode
Example:
```tsx
```
### Navigation
#### Breadcrumb
Import: `Breadcrumb`
Use: Path back out.
Live: /components/breadcrumb
Props:
- `items`: { label: string; href?: string }[] · required
- `label`: string · default "Breadcrumb"
Example:
```tsx
```
#### DropdownMenu
Import: `DropdownMenu`
Use: Actions from a labeled trigger.
Live: /components/dropdown
Props:
- `label`: string · required
- `items`: MenuAction[] · required · { label, onSelect?, shortcut?, destructive?, disabled?, separator? }
Example:
```tsx
```
#### Menubar
Import: `Menubar`
Use: App menu row.
Live: /components/menubar
Props:
- `menus`: { label: string; items: MenuAction[] }[] · required
Example:
```tsx
```
#### Pagination
Import: `Pagination`
Use: Page through a set.
Live: /components/pagination
Props:
- `page`: number · required
- `pageCount`: number · required
- `onChange`: (page: number) => void · required
- `label`: string · default "Pages"
Example:
```tsx
```
#### Step / SteppedHeader
Import: `Step, SteppedHeader`
Use: Progress through a sequence.
Live: /components/steps
Props:
- `Step.number`: number · required
- `Step.label`: string · required
- `Step.active`: boolean · default false
- `Step.complete`: boolean · default false
- `Step.isBlocked`: boolean · default false
- `SteppedHeader.steps`: { label: string }[] · required
- `SteppedHeader.current`: number · required
Example:
```tsx
```
#### Tabs
Import: `Tabs, TabList, Tab, TabPanel`
Use: Switch panels. Set defaultValue or value.
Live: /components/tabs
Props:
- `Tabs.defaultValue`: string
- `Tabs.value`: string
- `Tabs.onValueChange`: (value: string) => void
- `Tab.value`: string · required
- `TabPanel.value`: string · required
Example:
```tsx
AccountProfile
```
#### NavigationMenu
Import: `NavigationMenu`
Use: Site nav with optional flyout links.
Live: /components/nav
Props:
- `items`: { label: string; href?: string; links?: { title: string; href: string; hint?: string }[] }[] · required
Example:
```tsx
```
#### AppSidebar
Aliases: Sidebar
Import: `AppSidebar`
Use: Product shell nav: brand, grouped links, create action, settings/help, sign out.
Live: /components/sidebar
Props:
- `brand`: string · default "App"
- `brandHint`: string
- `groups`: { label?: string; items: { label: string; icon?: IconName; href?: string }[] }[]
- `items`: { label: string; icon?: IconName; href?: string }[] · Flat list fallback when groups is omitted
- `action`: { label: string; onClick?: () => void }
- `footer`: { label: string; icon?: IconName; href?: string }[]
- `onSignOut`: () => void
- `header`: ReactNode
- `current`: string · Active href or label
- `renderLink`: (props) => ReactNode
- `rail`: boolean · default false · Sidebar-only embed
- `children`: ReactNode
Example:
```tsx
{}} />
```
#### OverflowPopover
Import: `OverflowPopover`
Use: Park extra actions behind More.
Live: /components/overflow
Props:
- `label`: string · default "More"
- `children`: ReactNode · required
Example:
```tsx
```
### Data entry
#### TextField / TextArea
Import: `TextField, TextArea`
Use: Labeled inputs. Error string marks invalid.
Live: /components/text-field
Props:
- `label`: string · required
- `hint`: string
- `error`: string
- `value`: string
- `defaultValue`: string
- `onChange`: (value: string) => void
- `TextField.type`: "text" | "email" | "password" | "url" | "tel" · default "text"
- `TextField.canReveal`: boolean · default false · password eye
- `TextArea.rows`: number · default 4
Example:
```tsx
```
#### Select
Import: `Select`
Use: Custom dropdown with checkmark on the selected row. Use NativeSelect for the HTML select.
Live: /components/select
Props:
- `label`: string
- `options`: { label: string; value: string }[] · required
- `value`: string
- `onChange`: (value: string) => void
- `placeholder`: string · default "Select"
- `hideLabel`: boolean · default false
Example:
```tsx
```
#### Checkbox
Import: `Checkbox`
Use: Boolean with a label.
Live: /components/checkbox
Props:
- `checked`: boolean
- `defaultChecked`: boolean
- `onChange`: (checked: boolean) => void
- `disabled`: boolean
- `children`: ReactNode
Example:
```tsx
Email me product updates
```
#### Switch
Import: `Switch`
Use: On/off setting.
Live: /components/switch
Props:
- `checked`: boolean · default false
- `onChange`: (checked: boolean) => void
- `disabled`: boolean
- `children`: ReactNode
Example:
```tsx
Notifications
```
#### Radio
Import: `Radio`
Use: One choice in a small set.
Live: /components/radio
Props:
- `options`: { label: string; value: string; disabled?: boolean }[] · required
- `value`: string
- `onChange`: (value: string) => void
- `name`: string
- `legend`: string
Example:
```tsx
```
#### Slider
Import: `Slider`
Use: Numeric range.
Live: /components/slider
Props:
- `label`: string · required
- `value`: number · required
- `onChange`: (value: number) => void · required
- `min`: number · default 0
- `max`: number · default 100
- `step`: number · default 1
Example:
```tsx
```
#### Combobox
Import: `Combobox`
Use: Searchable select.
Live: /components/combobox
Props:
- `label`: string · required
- `options`: { label: string; value: string }[] · required
- `value`: string · required
- `onChange`: (value: string) => void · required
- `placeholder`: string · default "Search"
Example:
```tsx
```
#### DatePicker
Import: `DatePicker`
Use: Labeled date with a calendar.
Live: /components/date-picker
Props:
- `label`: string · required
- `value`: Date
- `onChange`: (date: Date) => void · required
Example:
```tsx
```
#### InputOTP
Import: `InputOTP`
Use: One-time code boxes.
Live: /components/otp
Props:
- `label`: string · required
- `value`: string · required
- `onChange`: (value: string) => void · required
- `length`: number · default 6
Example:
```tsx
```
#### InputGroup
Import: `InputGroup, InputGroupField`
Use: Prefix or suffix around a field.
Live: /components/input-group
Props:
- `prefix`: ReactNode
- `suffix`: ReactNode
- `children`: ReactNode · required
Example:
```tsx
```
#### Rating
Import: `Rating`
Use: Star score.
Live: /components/rating
Props:
- `value`: number · default 0
- `onChange`: (value: number) => void
- `max`: number · default 5
- `label`: string · default "Rating"
Example:
```tsx
```
#### Toggle / ToggleButton
Aliases: ToggleGroup
Import: `Toggle, ToggleButton`
Use: Toggle is one pressed control. ToggleButton is a labeled group.
Live: /components/toggle
Props:
- `Toggle.pressed`: boolean · required
- `Toggle.onPressedChange`: (pressed: boolean) => void · required
- `ToggleButton.options`: { label: string; value: string }[] · required
- `ToggleButton.value`: string · required
- `ToggleButton.onChange`: (value: string) => void · required
Example:
```tsx
```
#### Attachment
Import: `Attachment, AttachmentGroup`
Use: File chip with upload states.
Live: /components/attachment
Props:
- `name`: string · required
- `meta`: string · required
- `state`: "idle" | "uploading" | "processing" | "error" | "done" · default "done"
- `progress`: number
- `preview`: string
- `onRemove`: () => void
Example:
```tsx
```
#### Form
Import: `Form, FormRow, FormActions`
Use: Card form. title is required. onSubmit is already preventDefaulted.
Live: /components/form
Props:
- `title`: string · required
- `description`: string
- `onSubmit`: (event: FormEvent) => void
- `children`: ReactNode · required
Example:
```tsx
```
#### Field / Label / SearchInput / LanguageSelect
Import: `Field, Label, SearchInput, LanguageSelect`
Use: Field wraps a control with a label. SearchInput is a fluid controlled search box. LanguageSelect is a preset locale list.
Live: /components/field
Props:
- `Field.label`: string · required
- `SearchInput.value`: string · required
- `SearchInput.onChange`: (value: string) => void · required
- `SearchInput.label`: string · default "Search"
- `SearchInput.hideLabel`: boolean · default false · Keeps the accessible name. Use in rails and toolbars.
- `SearchInput.shape`: "default" | "pill" · default "default"
- `SearchInput.placeholder`: string · default "Search"
Example:
```tsx
```
### Data display
#### Avatar
Import: `Avatar`
Use: Initials from name, or src.
Live: /components/avatar
Props:
- `name`: string · required
- `src`: string
- `size`: "sm" | "md" | "lg" · default "md"
Example:
```tsx
```
#### Badge
Import: `Badge`
Use: Count on a control.
Live: /components/badge
Props:
- `count`: number · required
- `tone`: "pink" | "blue" | "ink" · default "pink"
- `label`: string
- `children`: ReactNode
Example:
```tsx
Inbox
```
#### Tag
Import: `Tag`
Use: Status chip.
Live: /components/tag
Props:
- `status`: "neutral" | "success" | "warning" | "danger" | "active" | "subtle" · default "neutral"
- `variant`: "filled" | "outlined" · default "filled"
- `children`: ReactNode · required
Example:
```tsx
Live
```
#### Status
Import: `Status`
Use: Live / error / pending marker.
Live: /components/status
Props:
- `status`: "success" | "done" | "live" | "pending" | "error" | "rejected" | "neutral" · default "neutral"
- `children`: ReactNode
Example:
```tsx
Live
```
#### Calendar
Import: `Calendar`
Use: Month grid without a field.
Live: /components/calendar
Props:
- `value`: Date
- `onChange`: (date: Date) => void
- `month`: Date
- `onMonthChange`: (month: Date) => void
Example:
```tsx
```
#### Card
Import: `Card, CardHeader, CardTitle, CardContent, CardActions`
Use: Product card. Do not nest cards.
Live: /components/card
Props:
- `children`: ReactNode · required
Example:
```tsx
Workspace12 members
```
#### Carousel
Import: `Carousel`
Use: Slides with prev/next.
Live: /components/carousel
Props:
- `slides`: ReactNode[] · required
Example:
```tsx
OneTwo