{"name":"onefold","version":"2.0.0","source":"src/design-system/catalog.ts","components":[{"slug":"button","name":"Button","summary":"The thing people click to do the main job.","useWhen":"There is one clear next step, like New task or Save.","avoidWhen":"The click only moves between sections. Use a tab for that.","snippet":"import { Button } from \"@/design-system\";\n\n<Button>New task</Button>\n<Button variant=\"outline\" size=\"sm\">Cancel</Button>\n<Button variant=\"destructive\" loading>Delete</Button>","playground":true},{"slug":"input","name":"Text field","summary":"One line of text, such as a search or a name.","useWhen":"You need a short answer.","avoidWhen":"The answer is a few sentences. Use the text area.","snippet":"import { Input } from \"@/design-system\";\n\n<Input placeholder=\"Search tasks\" />\n<Input aria-invalid placeholder=\"Project name\" />\n<Input placeholder=\"Disabled\" disabled />","playground":true},{"slug":"textarea","name":"Text area","summary":"A taller box for a note or a description.","useWhen":"People need more than one line.","avoidWhen":"The answer is a single word. Use the text field.","snippet":"import { Textarea } from \"@/design-system\";\n\n<Textarea placeholder=\"Write a note\" />\n<Textarea aria-invalid defaultValue=\"Too short\" />\n<Textarea placeholder=\"Disabled\" disabled />","playground":true},{"slug":"checkbox","name":"Checkbox","summary":"A small box for yes or no, or for finishing a task.","useWhen":"The choice can stay on or off, and several can be on together.","avoidWhen":"Only one choice in a group can be on. Use tabs or a switch for a single setting.","snippet":"import { Checkbox } from \"@/design-system\";\n\n<Checkbox label=\"Show done tasks\" defaultChecked />\n<Checkbox indeterminate label=\"Some tasks selected\" />\n<Checkbox label=\"Disabled\" disabled />","playground":true},{"slug":"switch","name":"Switch","summary":"An on or off control for a setting.","useWhen":"Turning it on changes something right away.","avoidWhen":"The person must confirm with a Save button. Use a checkbox.","snippet":"import { Switch } from \"@/design-system\";\n\n<Switch checked={on} onCheckedChange={setOn} label=\"Dark preview\" />\n<Switch checked={false} onCheckedChange={setOn} label=\"Disabled\" disabled />","playground":true},{"slug":"tabs","name":"Tabs","summary":"A row of sections. One is open at a time.","useWhen":"The sections are siblings, like Open, Done, and Notes.","avoidWhen":"The person is moving to a different page of the app.","snippet":"import { Tabs } from \"@/design-system\";\n\n<Tabs\n  tabs={[\n    { value: \"open\", label: \"Open\", content: \"Open tasks\" },\n    { value: \"done\", label: \"Done\", content: \"Finished tasks\" },\n    { value: \"archive\", label: \"Archive\", content: \"Kept out of the list.\", disabled: true },\n  ]}\n/>","playground":true},{"slug":"badge","name":"Badge","summary":"A small label for a status, like Ready or Blocked.","useWhen":"You need a short status next to a title.","avoidWhen":"The message needs a sentence. Use an alert.","snippet":"import { Badge } from \"@/design-system\";\nimport { Bell, Circle, CircleCheck } from \"lucide-react\";\n\n<Badge tone=\"accent\">In review</Badge>\n<Badge tone=\"success\">Ready</Badge>\n<Badge tone=\"success\" icon={<CircleCheck />}>Ready</Badge>\n<Badge icon={<Circle />}>Draft</Badge>\n<Badge dot />\n<span className=\"relative inline-flex\">\n  <Bell className=\"size-5\" />\n  <Badge count={4} className=\"absolute -top-1.5 -right-2\" />\n</span>","playground":true},{"slug":"avatar","name":"Avatar","summary":"A circle with a person's initials.","useWhen":"You are showing who owns a task.","avoidWhen":"You need their full name as the main text. Write the name.","snippet":"import { Avatar } from \"@/design-system\";\n\n<Avatar initials=\"DR\" />\n<Avatar initials=\"DR\" src=\"/portrait.svg\" />\n<Avatar initials=\"DR\" status=\"online\" />","playground":true},{"slug":"alert","name":"Alert","summary":"A note the person should see before they continue.","useWhen":"Something needs attention, succeeded, or failed.","avoidWhen":"It is only a status word. Use a badge.","snippet":"import { Alert } from \"@/design-system\";\n\n<Alert tone=\"info\" title=\"Theme file is ready\">\n  Download it before the next screen.\n</Alert>","playground":true},{"slug":"card","name":"Card","summary":"A quiet box. Outlined or filled, stacked or horizontal.","useWhen":"A few related facts belong together, with or without a picture.","avoidWhen":"The whole page is one group. You may not need a card.","snippet":"import { Button, ContentCard, RichCard } from \"@/design-system\";\n\n<ContentCard layout=\"text\" title=\"Today\" body=\"Three tasks are still open.\" action={<Button size=\"sm\">Review</Button>} />\n<ContentCard layout=\"text\" title=\"Selected\" body=\"Accent border and tint.\" selected />\n<ContentCard layout=\"text\" title=\"Disabled\" body=\"This card cannot be chosen.\" disabled />\n<RichCard title=\"Field notes\" body=\"Cover, tag, icon, and the next step.\" tag=\"Notes\" action={<Button size=\"sm\">Open</Button>} />\n<ContentCard layout=\"image-top\" title=\"Field notes\" body=\"The cover for the walkthrough.\" imageLabel=\"Cover\" />\n<ContentCard layout=\"image-left\" title=\"Theme file\" body=\"The roundness is 12.\" imageLabel=\"Preview\" />\n<ContentCard layout=\"image-right\" title=\"Type sample\" body=\"Outfit stays on headings.\" imageLabel=\"Type\" />\n<ContentCard layout=\"overlay\" title=\"Blue app\" body=\"The main action stays blue.\" imageLabel=\"Hero\" />\n<ContentCard layout=\"compact\" title=\"Check the roundness\" meta=\"Divya · Today\" imageLabel=\"Note\" />\n<ContentCard direction=\"stacked\" title=\"Outlined\" body=\"A border and the card color.\" />\n<ContentCard direction=\"stacked\" surface=\"filled\" title=\"Filled\" body=\"A muted fill, no border.\" />\n<ContentCard direction=\"horizontal\" title=\"Side by side\" body=\"The picture sits beside the text.\" imageLabel=\"Note\" />\n<ContentCard direction=\"horizontal\" surface=\"filled\" title=\"Filled row\" body=\"The fill changes when pressed.\" imageLabel=\"Note\" state=\"pressed\" />","playground":true},{"slug":"navbar","name":"Navbar","summary":"The bar at the top. Small, centered, medium, large, search, or an avatar.","useWhen":"A screen needs a name and a few actions along the top.","avoidWhen":"The person is moving between sections that already have a sidebar or bottom navigation.","snippet":"import { Navbar } from \"@/design-system\";\n\nconst links = [\n  { label: \"Product\", href: \"#product\", current: true },\n  { label: \"Pricing\", href: \"#pricing\" },\n  { label: \"Notes\", href: \"#notes\" },\n];\n\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} />\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} centered />\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} size=\"medium\" />\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} size=\"large\" />\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} searchPlaceholder=\"Search\" />\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} avatar=\"DR\" />\n<Navbar brand=\"Onefold\" actionLabel=\"Start\" links={links} scrolled />","playground":true},{"slug":"footer","name":"Footer","summary":"The quiet close of a page: name, links, and one line.","useWhen":"A marketing page needs a place to end.","avoidWhen":"The person is in the middle of a task. Do not put a footer in the way.","snippet":"import { Footer } from \"@/design-system\";\n\n<Footer\n  brand=\"Onefold\"\n  note=\"A quiet system for product teams.\"\n  links={[\n    { label: \"Product\", href: \"#product\" },\n    { label: \"Pricing\", href: \"#pricing\" },\n  ]}\n/>","playground":true},{"slug":"breadcrumbs","name":"Breadcrumbs","summary":"The path back to where this page sits.","useWhen":"The page is nested, like a project inside a list.","avoidWhen":"There is only one level. The title is enough.","snippet":"import { Breadcrumbs } from \"@/design-system\";\n\n<Breadcrumbs\n  items={[\n    { label: \"Home\", href: \"#home\" },\n    { label: \"Projects\", href: \"#projects\" },\n    { label: \"Blue app\" },\n  ]}\n/>","playground":true},{"slug":"accordion","name":"Accordion","summary":"A list of questions. One can be open.","useWhen":"The page has a few short answers people open one at a time.","avoidWhen":"The answer should be visible without a click. Write it on the page.","snippet":"import { Accordion } from \"@/design-system\";\n\n<Accordion\n  defaultOpen=\"What is included\"\n  items={[\n    { title: \"What is included\", content: \"The pieces a site and an app share.\" },\n    { title: \"Who is it for\", content: \"A designer who does not write the code.\" },\n  ]}\n/>","playground":true},{"slug":"icon-button","name":"Icon button","summary":"A square button with only an icon.","useWhen":"The action is familiar, like add, and the label would be noise.","avoidWhen":"The action is the main step on the page. Use a button with words.","snippet":"import { Plus } from \"lucide-react\";\nimport { IconButton } from \"@/design-system\";\n\n<IconButton label=\"Add task\" variant=\"primary\"><Plus /></IconButton>\n<IconButton label=\"More\"><Plus /></IconButton>","playground":true},{"slug":"search-field","name":"Search field","summary":"A text field with a search icon.","useWhen":"People look for something already in the list.","avoidWhen":"You are asking for a name or an email. Use a text field.","snippet":"import { SearchField } from \"@/design-system\";\n\n<SearchField aria-label=\"Search tasks\" placeholder=\"Search tasks\" />","playground":true},{"slug":"select","name":"Select","summary":"A closed list. The chosen item shows in the field.","useWhen":"There are more than a few choices and only one can be picked.","avoidWhen":"There are two or three choices that should all stay visible. Use radio.","snippet":"import { Select } from \"@/design-system\";\n\n<Select id=\"city\" label=\"Choose a city\" defaultValue=\"choose\" options={[{ value: \"choose\", label: \"Choose a city\" }]} />\n<Select id=\"status\" label=\"Status\" defaultValue=\"review\" options={[{ value: \"review\", label: \"In review\" }]} />\n<Select id=\"owner\" label=\"Owner\" aria-invalid defaultValue=\"\" options={[{ value: \"\", label: \"Choose a person\" }]} />\n<Select id=\"locked\" label=\"Locked\" disabled defaultValue=\"review\" options={[{ value: \"review\", label: \"In review\" }]} />","playground":true},{"slug":"radio","name":"Radio","summary":"A few choices where one stays selected.","useWhen":"People should see every choice at once.","avoidWhen":"The choice turns something on right away. Use a switch.","snippet":"import { RadioGroup } from \"@/design-system\";\n\n<RadioGroup\n  label=\"Notify me\"\n  name=\"notify\"\n  defaultValue=\"email\"\n  options={[\n    { value: \"email\", label: \"Email\" },\n    { value: \"app\", label: \"In the app\" },\n    { value: \"push\", label: \"Push\", disabled: true },\n  ]}\n/>","playground":true},{"slug":"segmented-control","name":"Segmented control","summary":"A short row of options. One is selected.","useWhen":"The choice changes the view, like Day or Week.","avoidWhen":"The sections need a lot of explanation. Use tabs.","snippet":"import { SegmentedControl } from \"@/design-system\";\n\n<SegmentedControl\n  label=\"Range\"\n  defaultValue=\"day\"\n    options={[\n    { value: \"day\", label: \"Day\" },\n    { value: \"week\", label: \"Week\" },\n    { value: \"month\", label: \"Month\" },\n    { value: \"year\", label: \"Year\", disabled: true },\n  ]}\n/>","playground":true},{"slug":"dialog","name":"Dialog","summary":"A modal with a title, a sentence, and two actions. The playground opens it from a button. It traps focus and closes from an action, Escape, or the backdrop.","useWhen":"The person should confirm before something is shared or removed.","avoidWhen":"The message can sit on the page. Use an alert.","snippet":"import { Button, Dialog } from \"@/design-system\";\n\n<Dialog title=\"Share this project\" trigger={<Button>Share this project</Button>} secondaryAction={<Button variant=\"outline\">Cancel</Button>} primaryAction={<Button>Share</Button>}>\n  People with the link can view the tasks.\n</Dialog>","playground":true},{"slug":"menu","name":"Menu","summary":"A short list of actions for one item. Choosing one shows that choice in the preview.","useWhen":"Extra actions should stay out of the way until asked.","avoidWhen":"There is only one action. Use a button.","snippet":"import { Menu } from \"@/design-system\";\n\n<Menu\n  items={[\n    { label: \"Edit\" },\n    { label: \"Duplicate\" },\n    { label: \"Delete\", destructive: true },\n  ]}\n/>","playground":true},{"slug":"toast","name":"Toast","summary":"A short confirmation that something just happened. The playground can hide and show it. It is not a toast queue.","useWhen":"A save or a download finished, and the page can stay as it is.","avoidWhen":"The person must act before continuing. Use a dialog or an alert.","snippet":"import { Toast } from \"@/design-system\";\n\n<Toast>Theme file is ready</Toast>\n<Toast tone=\"success\">Saved</Toast>\n<Toast tone=\"warning\">Name is missing</Toast>\n<Toast tone=\"danger\">Could not save</Toast>","playground":true},{"slug":"sidebar","name":"Sidebar","summary":"The main places in an app. One is current.","useWhen":"The product has a few sections people move between.","avoidWhen":"This is a marketing page. Use the navbar.","snippet":"import { Sidebar } from \"@/design-system\";\n\n<Sidebar\n  brand=\"Workspace\"\n  items={[\n    { label: \"Inbox\", href: \"#inbox\", current: true },\n    { label: \"Drafts\", href: \"#drafts\" },\n    { label: \"Sent\", href: \"#sent\" },\n  ]}\n/>\n<Sidebar\n  brand=\"Workspace\"\n  showIcons\n  items={[\n    { label: \"Inbox\", href: \"#inbox\", current: true },\n    { label: \"Drafts\", href: \"#drafts\" },\n    { label: \"Sent\", href: \"#sent\" },\n  ]}\n/>","playground":true},{"slug":"list-row","name":"List row","summary":"One person, a title, a short detail, and a status.","useWhen":"A list of work should scan in a single line.","avoidWhen":"The item needs a paragraph. Use a card.","snippet":"import { Badge, ListRow } from \"@/design-system\";\n\n<ListRow initials=\"DR\" title=\"Check the roundness\" meta=\"Divya · Today\" badge={<Badge tone=\"accent\">In review</Badge>} />\n<ListRow initials=\"JL\" title=\"Ship the blue app\" meta=\"Jules · Monday\" trailing=\"Today\" selected />","playground":true},{"slug":"empty-state","name":"Empty state","summary":"What to show when a list has nothing in it yet.","useWhen":"The first visit has no tasks, files, or results.","avoidWhen":"The list has items. Show the list.","snippet":"import { Button, EmptyState } from \"@/design-system\";\n\n<EmptyState title=\"No tasks yet\" action={<Button>New task</Button>}>\n  When you add a task, it shows up here.\n</EmptyState>\n<EmptyState title=\"No results\">Try a different search.</EmptyState>","playground":true},{"slug":"progress","name":"Progress","summary":"A thin bar that shows how far along something is.","useWhen":"A setup or an upload has a known amount left.","avoidWhen":"You only know that work is happening, not how much is done.","snippet":"import { Progress } from \"@/design-system\";\n\n<Progress label=\"Partial\" value={60} />\n<Progress label=\"Complete\" value={100} />\n<Progress label=\"Saving\" />","playground":true},{"slug":"link","name":"Link","summary":"A text link to another page or section.","useWhen":"The person is moving somewhere, not submitting a form.","avoidWhen":"The click is the main action. Use a button.","snippet":"import { Link } from \"@/design-system\";\n\n<Link href=\"#notes\">Read the notes</Link>","playground":true},{"slug":"tag","name":"Tag","summary":"A small word you can remove, like a topic.","useWhen":"The person added a label and may take it off.","avoidWhen":"It is a status they cannot change. Use a badge.","snippet":"import { Tag } from \"@/design-system\";\n\n<Tag>Design</Tag>\n<Tag icon={<span className=\"size-1.5 rounded-full bg-current\" />}>Theme</Tag>","playground":true},{"slug":"avatar-group","name":"Avatar group","summary":"A few people, overlapping, with a count when there are more.","useWhen":"A task has more than one person on it.","avoidWhen":"You need each name in full. Write the names.","snippet":"import { AvatarGroup } from \"@/design-system\";\n\n<AvatarGroup people={[{ initials: \"DR\" }, { initials: \"AM\" }, { initials: \"JL\" }]} />","playground":true},{"slug":"divider","name":"Divider","summary":"A quiet line between two groups.","useWhen":"Two groups on the same page need a pause.","avoidWhen":"A heading already separates them.","snippet":"import { Divider } from \"@/design-system\";\n\n<Divider label=\"Or\" />","playground":true},{"slug":"tooltip","name":"Tooltip","summary":"A short hint that shows on hover or keyboard focus.","useWhen":"An icon button needs one extra phrase.","avoidWhen":"The words must stay visible. Write them on the page.","snippet":"import { Button, Tooltip } from \"@/design-system\";\n\n<Tooltip label=\"Saves this project\"><Button>Save</Button></Tooltip>","playground":true},{"slug":"spinner","name":"Spinner","summary":"A small mark that work is still happening.","useWhen":"You do not know how much is left.","avoidWhen":"You know the amount. Use progress.","snippet":"import { Spinner } from \"@/design-system\";\n\n<Spinner label=\"Saving\" />","playground":true},{"slug":"skeleton","name":"Skeleton","summary":"A soft placeholder while a list is loading.","useWhen":"The shape of the content is known, but the words are not here yet.","avoidWhen":"The load is instant. Show the content.","snippet":"import { Skeleton } from \"@/design-system\";\n\n<Skeleton className=\"h-4 w-40\" />","playground":false},{"slug":"password-field","name":"Password field","summary":"A hidden field with a way to show the letters.","useWhen":"The person is signing in or choosing a password.","avoidWhen":"The text is not secret. Use a text field.","snippet":"import { PasswordField } from \"@/design-system\";\n\n<PasswordField aria-label=\"Password\" />","playground":true},{"slug":"number-field","name":"Number field","summary":"A number you can type or step up and down.","useWhen":"The answer is a count, like seats or copies.","avoidWhen":"Any text is allowed. Use a text field.","snippet":"import { NumberField } from \"@/design-system\";\n\n<NumberField aria-label=\"Seats\" defaultValue={3} />","playground":true},{"slug":"slider","name":"Slider","summary":"A thin bar for a value inside a range.","useWhen":"The exact number matters less than about where it sits.","avoidWhen":"The person must type an exact number. Use a number field.","snippet":"import { Slider } from \"@/design-system\";\n\n<Slider label=\"Roundness\" min={0} max={24} defaultValue={14} />","playground":true},{"slug":"file-field","name":"File field","summary":"A way to choose one file from the computer.","useWhen":"The person is attaching a theme file or a picture.","avoidWhen":"You only need a link. Use a text field.","snippet":"import { FileField } from \"@/design-system\";\n\n<FileField label=\"Theme file\" />","playground":true},{"slug":"form","name":"Form","summary":"A title, labeled fields, one error, and a submit button. Submit stays on the page and shows a local result.","useWhen":"Several answers belong to one action, such as creating a task.","avoidWhen":"There is only one field. Use that field, or a form field when it needs a hint.","snippet":"import { Form } from \"@/design-system\";\n\n<Form />","playground":false},{"slug":"form-field","name":"Form field","summary":"A label, the control, a hint, and an error when needed.","useWhen":"A field needs an explanation or a correction.","avoidWhen":"The control is already labeled, like a checkbox with its own words.","snippet":"import { FormField, Input } from \"@/design-system\";\n\n<FormField label=\"Email\" error=\"Enter an email with an @ sign.\">\n  <Input defaultValue=\"divya\" />\n</FormField>","playground":true},{"slug":"pagination","name":"Pagination","summary":"Back, page numbers, and next.","useWhen":"A long list is split into pages.","avoidWhen":"Everything fits on one screen.","snippet":"import { Pagination } from \"@/design-system\";\n\n<Pagination count={3} defaultPage={2} />","playground":true},{"slug":"steps","name":"Steps","summary":"The stages of a short flow. One is current.","useWhen":"Setup has a few ordered stages.","avoidWhen":"The stages are not in order. Use tabs.","snippet":"import { Steps } from \"@/design-system\";\n\n<Steps\n  items={[\n    { label: \"Account\", state: \"done\" },\n    { label: \"Project\", state: \"current\" },\n    { label: \"Invite\", state: \"upcoming\" },\n  ]}\n/>","playground":true},{"slug":"table","name":"Table","summary":"Rows and columns of short facts.","useWhen":"People compare the same fields across items.","avoidWhen":"Each item is a story. Use a list row or a card.","snippet":"import { Table } from \"@/design-system\";\n\n<Table\n  caption=\"Open tasks\"\n  columns={[\"Task\", \"Owner\", \"Status\"]}\n  rows={[[\"Check the roundness\", \"Divya\", \"In review\"]]}\n  selectedIndex={0}\n/>\n<Table caption=\"Saved\" columns={[\"Task\", \"Owner\", \"Status\"]} rows={[]} empty=\"No saved tasks.\" />","playground":true},{"slug":"metric-tile","name":"Metric tile","summary":"One number, what it means, and a short hint.","useWhen":"A dashboard needs a few counts at the top.","avoidWhen":"The number needs a shape over time. Use the graph.","snippet":"import { MetricTile } from \"@/design-system\";\n\n<MetricTile label=\"Open\" value=\"4\" hint=\"Still in progress\" />","playground":true},{"slug":"description-list","name":"Description list","summary":"Pairs of a label and a fact.","useWhen":"A detail page has a few attributes.","avoidWhen":"The facts are a long table. Use a table.","snippet":"import { DescriptionList } from \"@/design-system\";\n\n<DescriptionList items={[{ term: \"Owner\", detail: \"Divya\" }]} />","playground":false},{"slug":"timeline","name":"Timeline","summary":"What happened, in order, with a date.","useWhen":"A record of changes should read from newest to oldest, or the reverse.","avoidWhen":"There is only one event. Write a sentence.","snippet":"import { Timeline } from \"@/design-system\";\n\n<Timeline\n  items={[{ title: \"Theme saved\", meta: \"Today\", detail: \"The blue app theme was stored.\" }]}\n/>","playground":false},{"slug":"banner","name":"Banner","summary":"A full-width note with one optional action.","useWhen":"The whole page should hear one short message.","avoidWhen":"The note belongs to one field. Use an alert or a form error.","snippet":"import { Banner, Button } from \"@/design-system\";\n\n<Banner action={<Button size=\"sm\">Review</Button>}>\n  Two tasks need a look before Friday.\n</Banner>","playground":true},{"slug":"drawer","name":"Drawer","summary":"A side panel with a title and a way to close it. In the playground, Close hides it until it is opened again.","useWhen":"Filters or details should sit beside the page, not on top of a form.","avoidWhen":"The person must confirm a destructive step. Use a dialog.","snippet":"import { Drawer } from \"@/design-system\";\n\n<Drawer title=\"Filters\" onClose={() => undefined}>\n  Show open tasks only.\n</Drawer>","playground":true},{"slug":"filter-chips","name":"Filter chips","summary":"A row of filters. More than one can be on.","useWhen":"A list can be narrowed by a few known words.","avoidWhen":"Only one choice should be on. Use radio or a segmented control.","snippet":"import { FilterChips } from \"@/design-system\";\n\n<FilterChips\n  label=\"Show\"\n  defaultValue={[\"open\"]}\n  options={[\n    { value: \"open\", label: \"Open\" },\n    { value: \"blocked\", label: \"Blocked\" },\n  ]}\n/>","playground":true},{"slug":"page-header","name":"Page header","summary":"The title of a product page, a sentence, and the main action.","useWhen":"An app page needs a name and one next step.","avoidWhen":"This is the marketing site. Use the navbar.","snippet":"import { Button, PageHeader } from \"@/design-system\";\n\n<PageHeader title=\"Tasks\" lede=\"Four are still open.\" actions={<Button>New task</Button>} />","playground":true},{"slug":"quote","name":"Quote","summary":"A sentence from a person, with their name.","useWhen":"A marketing page uses one real line from a customer.","avoidWhen":"You are writing the product's own instructions.","snippet":"import { Quote } from \"@/design-system\";\n\n<Quote quote=\"The main button stays easy to find.\" name=\"Amira\" role=\"Design\" />","playground":true},{"slug":"profile-card","name":"Profile card","summary":"A person, their role, and one line about them.","useWhen":"A directory or an about page introduces someone.","avoidWhen":"You only need initials in a list. Use an avatar.","snippet":"import { ProfileCard } from \"@/design-system\";\n\n<ProfileCard initials=\"DR\" name=\"Divya Ray\" role=\"Product design\" note=\"Keeps the main action blue.\" />","playground":true},{"slug":"prompt-field","name":"Prompt field","summary":"A box for a question, with one send button. Send stays on the page and says no model was called.","useWhen":"An assistant is asked one thing at a time.","avoidWhen":"The text is saved as a note. Use a text area.","snippet":"import { PromptField } from \"@/design-system\";\n\n<PromptField />","playground":true},{"slug":"source-response","name":"Response","summary":"An answer with a source line under it.","useWhen":"The words came from a document the person can check.","avoidWhen":"There is no source. Do not invent one.","snippet":"import { SourceResponse } from \"@/design-system\";\n\n<SourceResponse source=\"Theme notes, today\">\n  The highlight color is for notes, not the main button.\n</SourceResponse>","playground":true},{"slug":"accept-reject","name":"Accept or reject","summary":"A suggestion with two actions: accept or reject.","useWhen":"A person should decide on one proposed change.","avoidWhen":"The change is already saved. Use a toast.","snippet":"import { AcceptReject } from \"@/design-system\";\n\n<AcceptReject title=\"Use the quieter title?\">\n  The page title would drop the extra words.\n</AcceptReject>","playground":true},{"slug":"date-field","name":"Date field","summary":"A field for a calendar day.","useWhen":"The person is picking a day, like a due date.","avoidWhen":"You only need the words Today or Friday. Write the words.","snippet":"import { DateField } from \"@/design-system\";\n\n<DateField label=\"Due\" defaultValue=\"2026-11-06\" />","playground":true},{"slug":"time-field","name":"Time field","summary":"A field for a time of day.","useWhen":"The person is setting an hour, like a reminder.","avoidWhen":"The time is only a label. Write it.","snippet":"import { TimeField } from \"@/design-system\";\n\n<TimeField label=\"Reminder\" defaultValue=\"09:30\" />","playground":true},{"slug":"multi-select","name":"Multi-select","summary":"A field that opens a list and toggles more than one chosen item.","useWhen":"Several known choices can be on together, and the list should stay closed.","avoidWhen":"People should see every choice at once. Use checkboxes or filter chips.","snippet":"import { MultiSelect } from \"@/design-system\";\n\n<MultiSelect label=\"Topics\" values={[\"Design\", \"Theme\"]} />","playground":true},{"slug":"combobox","name":"Combobox","summary":"A field that opens and picks one item from a list.","useWhen":"The person picks one known item, and the list should stay closed until asked.","avoidWhen":"There are only two or three choices. Use radio.","snippet":"import { Combobox } from \"@/design-system\";\n\n<Combobox label=\"Project\" value=\"Blue app\" />","playground":true},{"slug":"range-slider","name":"Range slider","summary":"A bar with two ends, for a low and a high value. Each end can move.","useWhen":"A filter has a minimum and a maximum, like a price.","avoidWhen":"There is only one value. Use the slider.","snippet":"import { RangeSlider } from \"@/design-system\";\n\n<RangeSlider label=\"Price\" start={24} end={80} startLabel=\"$24\" endLabel=\"$80\" />","playground":true},{"slug":"otp-field","name":"One-time code","summary":"Six boxes that accept a short code.","useWhen":"The person is entering a code from an email or an app.","avoidWhen":"The secret is a password. Use the password field.","snippet":"import { OtpField } from \"@/design-system\";\n\n<OtpField label=\"Code\" value=\"481902\" />","playground":true},{"slug":"color-field","name":"Color field","summary":"A swatch next to a hex code. Editing the hex updates the swatch.","useWhen":"The person is choosing a color and needs to see the hex.","avoidWhen":"The color is already set by the theme and should not be edited here.","snippet":"import { ColorField } from \"@/design-system\";\n\n<ColorField label=\"Highlight\" color=\"#2F6FED\" />","playground":true},{"slug":"character-counter","name":"Character counter","summary":"A field that shows how many characters are used.","useWhen":"The text has a limit, like a title.","avoidWhen":"There is no limit. Use a text field.","snippet":"import { CharacterCounter } from \"@/design-system\";\n\n<CharacterCounter label=\"Title\" max={48} defaultValue=\"Check the roundness\" />","playground":true},{"slug":"affixed-field","name":"Field with prefix and suffix","summary":"A text field with a fixed prefix and suffix.","useWhen":"The person fills the middle, like a price in USD.","avoidWhen":"The whole value is free text. Use a text field.","snippet":"import { AffixedField } from \"@/design-system\";\n\n<AffixedField label=\"Price\" prefix=\"$\" suffix=\"USD\" defaultValue=\"24\" />","playground":true},{"slug":"bottom-navigation","name":"Bottom navigation","summary":"A phone-width bar of sections. Each item has an icon and a short label.","useWhen":"A small screen needs a few sections always in reach.","avoidWhen":"The screen is wide and already has a sidebar.","snippet":"import { BottomNav } from \"@/design-system\";\n\n<BottomNav\n  items={[\n    { label: \"Home\", href: \"#home\", icon: \"home\", current: true },\n    { label: \"Tasks\", href: \"#tasks\", icon: \"tasks\" },\n    { label: \"Notes\", href: \"#notes\", icon: \"notes\" },\n    { label: \"Search\", href: \"#search\", icon: \"search\" },\n    { label: \"Profile\", href: \"#profile\", icon: \"profile\" },\n  ]}\n/>","playground":false},{"slug":"nav-rail","name":"Nav rail","summary":"A narrow column of the main places.","useWhen":"The app needs navigation, and a full sidebar is too wide.","avoidWhen":"Each place needs a longer label. Use the sidebar.","snippet":"import { NavRail } from \"@/design-system\";\n\n<NavRail\n  items={[\n    { label: \"Home\", href: \"#home\", current: true },\n    { label: \"Tasks\", href: \"#tasks\" },\n    { label: \"Notes\", href: \"#notes\" },\n  ]}\n/>","playground":false},{"slug":"command-menu","name":"Command menu","summary":"A panel of a few commands. Choosing one highlights it in the preview.","useWhen":"Extra commands should open together in one list.","avoidWhen":"The person is searching the contents of a list. Use the search field.","snippet":"import { CommandMenu } from \"@/design-system\";\n\n<CommandMenu\n  items={[\n    { label: \"New task\", detail: \"Create\", current: true },\n    { label: \"Open theme\", detail: \"View\" },\n  ]}\n/>","playground":true},{"slug":"profile-menu","name":"Profile menu","summary":"The signed-in person, with a few account actions. Choosing one shows that choice in the preview.","useWhen":"Settings and sign out should sit with the person's name.","avoidWhen":"You are introducing the person on a page. Use a profile card.","snippet":"import { ProfileMenu } from \"@/design-system\";\n\n<ProfileMenu\n  initials=\"DR\"\n  name=\"Divya Ray\"\n  role=\"Product design\"\n  items={[{ label: \"Settings\" }, { label: \"Sign out\", destructive: true }]}\n/>","playground":true},{"slug":"back-link","name":"Back link","summary":"A link that returns to the previous page.","useWhen":"The page is one step in from a list.","avoidWhen":"The path has several levels. Use breadcrumbs.","snippet":"import { BackLink } from \"@/design-system\";\n\n<BackLink href=\"#tasks\">Back to tasks</BackLink>","playground":true},{"slug":"sortable-table","name":"Sortable table","summary":"A table whose header shows the current sort.","useWhen":"People compare rows and need to see which column is sorted.","avoidWhen":"The order never changes. Use a table.","snippet":"import { SortableTable } from \"@/design-system\";\n\n<SortableTable\n  caption=\"Open tasks\"\n  columns={[{ label: \"Task\" }, { label: \"Owner\", sort: \"ascending\" }]}\n  rows={[[\"Check the roundness\", \"Divya\"]]}\n/>","playground":true},{"slug":"activity-feed","name":"Activity feed","summary":"A short list of who did what, and when.","useWhen":"A page should show recent actions by people.","avoidWhen":"The events have no person attached. Use a timeline.","snippet":"import { ActivityFeed } from \"@/design-system\";\n\n<ActivityFeed\n  items={[{ id: \"saved\", initials: \"AM\", text: \"Amira saved the theme file.\", meta: \"Today\" }]}\n/>","playground":false},{"slug":"calendar-month","name":"Calendar month","summary":"A month grid. Days can be selected, and the month can move backward or forward.","useWhen":"Someone is choosing a date inside one month.","avoidWhen":"A closed date field is enough. Use the date field. The date picker pairs the field with this month.","snippet":"import { CalendarMonth } from \"@/design-system\";\n\n<CalendarMonth label=\"November 2026\" today={6} />","playground":true},{"slug":"kanban-column","name":"Kanban column","summary":"A column of task cards. The playground shows KanbanBoard, which moves a card by drag, arrow keys, or a column menu.","useWhen":"Work is grouped by status and a card can change status.","avoidWhen":"The list is a flat table. Use a table.","snippet":"import { KanbanBoard, KanbanColumn } from \"@/design-system\";\n\n<KanbanColumn title=\"In review\" cards={[{ title: \"Check the roundness\", meta: \"Divya\" }]} />\n<KanbanBoard />","playground":true},{"slug":"tree-rows","name":"Tree rows","summary":"A list with one level of children. A parent row expands and collapses.","useWhen":"Items sit inside a parent, like files in a project.","avoidWhen":"The list is flat. Use a list row or a file list.","snippet":"import { TreeRows } from \"@/design-system\";\n\n<TreeRows\n  items={[{ id: \"blue\", label: \"Blue app\", children: [{ id: \"tasks\", label: \"Tasks\" }] }]}\n/>","playground":true},{"slug":"file-list","name":"File list","summary":"File names with a short detail, like the size.","useWhen":"The person is looking at files already saved.","avoidWhen":"The person is choosing a file to upload. Use the file field.","snippet":"import { FileList } from \"@/design-system\";\n\n<FileList files={[{ name: \"theme.json\", meta: \"2 KB\" }]} />","playground":false},{"slug":"comparison-list","name":"Comparison list","summary":"The same facts for two things, side by side.","useWhen":"A person is choosing between two options.","avoidWhen":"There are many columns. Use a table.","snippet":"import { ComparisonList } from \"@/design-system\";\n\n<ComparisonList\n  caption=\"Two themes\"\n  columns={[\"Blue app\", \"Health notes\"]}\n  rows={[{ label: \"Roundness\", values: [\"14\", \"8\"] }]}\n/>","playground":true},{"slug":"progress-circle","name":"Progress circle","summary":"A ring that shows how far along something is.","useWhen":"A small space needs a known amount of progress.","avoidWhen":"You only know that work is happening. Use a spinner. For a wide space, use the progress bar.","snippet":"import { ProgressCircle } from \"@/design-system\";\n\n<ProgressCircle label=\"Setup\" value={60} />","playground":true},{"slug":"offline-banner","name":"Offline banner","summary":"A note that this device is not connected.","useWhen":"The page should say that changes cannot be sent yet.","avoidWhen":"The connection is fine.","snippet":"import { OfflineBanner } from \"@/design-system\";\n\n<OfflineBanner />","playground":true},{"slug":"confirmation-banner","name":"Confirmation banner","summary":"A full-width note that an action succeeded. In the playground, the action stays on the page.","useWhen":"The page itself should confirm a save or a send.","avoidWhen":"A small corner note is enough. Use a toast.","snippet":"import { ConfirmationBanner } from \"@/design-system\";\n\n<ConfirmationBanner>Blue app was saved.</ConfirmationBanner>","playground":true},{"slug":"popover","name":"Popover","summary":"A small panel tied to one control. The trigger opens and closes it.","useWhen":"A few extra words belong to one button.","avoidWhen":"The words must stay on the page. Write them. For a hint on hover, use a tooltip.","snippet":"import { Popover } from \"@/design-system\";\n\n<Popover label=\"Details\" title=\"Roundness\" open>\n  The corners follow the theme.\n</Popover>","playground":true},{"slug":"popup","name":"Popup","summary":"A small surface beside its trigger. The trigger and close button open and close it.","useWhen":"A title, a line or two, and one action belong next to a trigger.","avoidWhen":"The message must block the page. Use a dialog. A hint without an action is a tooltip.","snippet":"import { Popup } from \"@/design-system\";\n\n<Popup trigger=\"Details\" title=\"Share update\" action=\"Copy link\">\n  Anyone with the link can view this project.\n</Popup>","playground":true},{"slug":"bottom-sheet","name":"Bottom sheet","summary":"A panel along the bottom, with a way to close it. In the playground, Close hides it until it is opened again.","useWhen":"A short task on a small screen should come forward without leaving the page.","avoidWhen":"The details sit beside a list. Use a drawer. For a destructive confirm, use a dialog.","snippet":"import { BottomSheet } from \"@/design-system\";\n\n<BottomSheet title=\"Move task\" onClose={() => undefined}>\n  This task will move to Ready.\n</BottomSheet>","playground":true},{"slug":"lightbox","name":"Lightbox","summary":"An image frame with a close control. Close hides it until it is opened again.","useWhen":"A picture should be looked at on its own.","avoidWhen":"The picture stays in the page. Use an image frame.","snippet":"import { Lightbox } from \"@/design-system\";\n\n<Lightbox label=\"Project cover\" onClose={() => undefined} />","playground":true},{"slug":"notification-panel","name":"Notification panel","summary":"A list of recent notices.","useWhen":"The person opens a list of things that happened.","avoidWhen":"One notice just happened and can fade. Use a toast.","snippet":"import { NotificationPanel } from \"@/design-system\";\n\n<NotificationPanel items={[{ id: \"ready\", title: \"Theme file is ready\", meta: \"Today\" }]} />","playground":true},{"slug":"image-frame","name":"Image frame","summary":"A framed picture with a caption.","useWhen":"A page shows one image and what it is.","avoidWhen":"The image should take over the screen. Use a lightbox.","snippet":"import { ImageFrame } from \"@/design-system\";\n\n<ImageFrame label=\"Project cover\" caption=\"Blue app, today\" />","playground":true},{"slug":"code-block","name":"Code block","summary":"A short piece of code, set apart from the paragraph.","useWhen":"You are showing a snippet someone might read.","avoidWhen":"The words are a normal sentence. Write the sentence.","snippet":"import { CodeBlock } from \"@/design-system\";\n\n<CodeBlock code={'<Button>Save</Button>'} />","playground":true},{"slug":"article-card","name":"Article card","summary":"A title, a date, and a short summary for a piece of writing.","useWhen":"A list of articles needs the same shape.","avoidWhen":"The item is a task. Use a list row or a card.","snippet":"import { ArticleCard } from \"@/design-system\";\n\n<ArticleCard\n  title=\"Why the main button stays blue\"\n  meta=\"Today\"\n  summary=\"The blue is for the next step.\"\n/>","playground":true},{"slug":"product-card","name":"Product card","summary":"A product name, a price, and one detail.","useWhen":"A shop list shows a few products the same way.","avoidWhen":"You are not selling something. Use a card.","snippet":"import { ProductCard } from \"@/design-system\";\n\n<ProductCard name=\"Field notebook\" price=\"$18\" detail=\"120 plain pages.\" />","playground":true},{"slug":"link-preview","name":"Link preview","summary":"A title, a site name, and a sentence for a link.","useWhen":"A shared link should show what it points at.","avoidWhen":"The link is only a few words in a sentence. Use a link.","snippet":"import { LinkPreviewCard } from \"@/design-system\";\n\n<LinkPreviewCard\n  href=\"#notes\"\n  site=\"onefold.dev\"\n  title=\"Theme notes\"\n  description=\"How the main color and the highlight stay apart.\"\n/>","playground":true},{"slug":"prose-block","name":"Prose block","summary":"A heading and a paragraph, set as reading text.","useWhen":"A page has one section of writing.","avoidWhen":"You need a full editor. That is later work. Use a text area for notes.","snippet":"import { ProseBlock } from \"@/design-system\";\n\n<ProseBlock heading=\"How a theme is saved\">\n  The theme file holds the colors, the font, and the roundness.\n</ProseBlock>","playground":true},{"slug":"selection-card","name":"Selection card","summary":"A card that is either selected or not.","useWhen":"One choice should show a title and a sentence, and can be on or off.","avoidWhen":"The choice is only a word. Use a checkbox.","snippet":"import { SelectionCard } from \"@/design-system\";\n\n<SelectionCard title=\"Email\" detail=\"A note when a task changes.\" selected />","playground":true},{"slug":"radio-cards","name":"Radio cards","summary":"A few cards where one stays selected.","useWhen":"Each choice needs a title and a sentence, and only one can be on.","avoidWhen":"The choices are single words. Use radio.","snippet":"import { RadioCards } from \"@/design-system\";\n\n<RadioCards\n  label=\"Notify me\"\n  name=\"notify-cards\"\n  defaultValue=\"email\"\n  options={[{ value: \"email\", title: \"Email\", detail: \"A note when a task changes.\" }]}\n/>","playground":true},{"slug":"checkbox-cards","name":"Checkbox cards","summary":"Cards that can be on together.","useWhen":"Each choice needs a sentence, and more than one can be on.","avoidWhen":"The choices are single words. Use checkboxes.","snippet":"import { CheckboxCards } from \"@/design-system\";\n\n<CheckboxCards\n  label=\"Include\"\n  defaultValue={[\"tasks\"]}\n  options={[{ value: \"tasks\", title: \"Tasks\", detail: \"Open work for this project.\" }]}\n/>","playground":true},{"slug":"bulk-action-bar","name":"Bulk action bar","summary":"A bar for when several items are selected.","useWhen":"The person has selected more than one row and needs one action for all of them.","avoidWhen":"Only one item is selected. Use that row's own action.","snippet":"import { BulkActionBar, Button } from \"@/design-system\";\n\n<BulkActionBar count={3}>\n  <Button size=\"sm\" variant=\"outline\">Clear</Button>\n</BulkActionBar>","playground":true},{"slug":"sort-control","name":"Sort control","summary":"A control that opens and picks how the list is ordered.","useWhen":"The person can change the order, and the current order should stay visible.","avoidWhen":"The order is fixed. Do not offer a control.","snippet":"import { SortControl } from \"@/design-system\";\n\n<SortControl value=\"Updated\" />","playground":true},{"slug":"stack","name":"Stack","summary":"Even space down a column.","useWhen":"A few items should sit one under another with the same gap.","avoidWhen":"The items should sit side by side. Use a grid.","snippet":"import { Stack } from \"@/design-system\";\n\n<Stack>\n  <p>Name</p>\n  <p>Email</p>\n</Stack>","playground":false},{"slug":"simple-grid","name":"Simple grid","summary":"Even columns for a few items.","useWhen":"Two items should line up.","avoidWhen":"The layout is one column. Use a stack.","snippet":"import { SimpleGrid } from \"@/design-system\";\n\n<SimpleGrid>\n  <p>Open</p>\n  <p>Ready</p>\n</SimpleGrid>","playground":false},{"slug":"split-pane","name":"Split pane","summary":"Two regions side by side.","useWhen":"A list and its detail should be visible together.","avoidWhen":"One region is enough.","snippet":"import { SplitPane } from \"@/design-system\";\n\n<SplitPane start=\"Tasks\" end=\"Check the roundness is in review.\" />","playground":false},{"slug":"citation-row","name":"Citation row","summary":"A numbered source under an answer.","useWhen":"An answer points at one document the person can check.","avoidWhen":"There is no source. Do not invent a number.","snippet":"import { CitationRow } from \"@/design-system\";\n\n<CitationRow index={1} title=\"Theme notes\" source=\"Today\" />","playground":true},{"slug":"confidence-line","name":"Confidence line","summary":"A short line that says how sure an answer is.","useWhen":"The person should see that an answer is high, medium, or low confidence.","avoidWhen":"You do not know. Do not invent a level.","snippet":"import { ConfidenceLine } from \"@/design-system\";\n\n<ConfidenceLine level=\"High\" note=\"The theme notes say this directly.\" />","playground":true},{"slug":"agent-status","name":"Agent status","summary":"Whether an assistant is working, idle, or waiting.","useWhen":"A long task should show what the assistant is doing now.","avoidWhen":"The work already finished. Use a toast or a confirmation banner.","snippet":"import { AgentStatus } from \"@/design-system\";\n\n<AgentStatus name=\"Onefold\" status=\"Working\" detail=\"Reading the theme notes.\" />","playground":true},{"slug":"safety-warning","name":"Safety warning","summary":"A warning about the limits of an answer.","useWhen":"The person should not treat the words as a final decision.","avoidWhen":"The message is a normal page error. Use an alert.","snippet":"import { SafetyWarning } from \"@/design-system\";\n\n<SafetyWarning title=\"Check this before you ship\">\n  The answer is a draft. A person still decides.\n</SafetyWarning>","playground":true},{"slug":"model-selector","name":"Model selector","summary":"A field that shows a model name. Choosing a name only changes the label. No model is called.","useWhen":"The person can switch models, and the current one should stay visible.","avoidWhen":"There is only one model. Write its name.","snippet":"import { ModelSelector } from \"@/design-system\";\n\n<ModelSelector value=\"Standard\" detail=\"Used for this project.\" />","playground":true},{"slug":"source-card","name":"Source card","summary":"One source, with its title and a short extract.","useWhen":"The document itself should be visible, not only a line under an answer.","avoidWhen":"You only need the line under the answer. Use a response.","snippet":"import { SourceCard } from \"@/design-system\";\n\n<SourceCard title=\"Theme notes\" source=\"Today\">\n  The highlight color is for notes, not the main button.\n</SourceCard>","playground":true},{"slug":"email-field","name":"Email field","summary":"A field for an email address.","useWhen":"The person is entering an address like divya@example.com.","avoidWhen":"You only need a name. Use a text field.","snippet":"import { EmailField } from \"@/design-system\";\n\n<EmailField label=\"Email\" defaultValue=\"divya@example.com\" />","playground":true},{"slug":"phone-field","name":"Phone field","summary":"A field for a phone number.","useWhen":"The person is entering a number you may call.","avoidWhen":"You need an email. Use the email field.","snippet":"import { PhoneField } from \"@/design-system\";\n\n<PhoneField label=\"Phone\" defaultValue=\"+1 415 555 0148\" />","playground":true},{"slug":"url-field","name":"URL field","summary":"A field for a web address.","useWhen":"The person is pasting a link.","avoidWhen":"The link is only shown, not edited. Use a link.","snippet":"import { UrlField } from \"@/design-system\";\n\n<UrlField label=\"Site\" defaultValue=\"https://onefold.example/notes\" />","playground":true},{"slug":"currency-field","name":"Currency field","summary":"A field for an amount of money.","useWhen":"The person is entering a price or a budget.","avoidWhen":"The amount is only displayed. Write it as text.","snippet":"import { CurrencyField } from \"@/design-system\";\n\n<CurrencyField label=\"Budget\" defaultValue=\"24.00\" />","playground":true},{"slug":"date-range","name":"Date range","summary":"A start date and an end date.","useWhen":"The person is choosing a span of days.","avoidWhen":"You need a single day. Use the date field.","snippet":"import { DateRange } from \"@/design-system\";\n\n<DateRange start=\"2026-03-12\" end=\"2026-03-18\" />","playground":true},{"slug":"drop-upload","name":"Drop upload","summary":"A drop area for one file.","useWhen":"The person may drag a file onto the page.","avoidWhen":"A simple choose-file control is enough. Use the file field.","snippet":"import { DropUpload } from \"@/design-system\";\n\n<DropUpload label=\"Theme file\" />","playground":true},{"slug":"mega-menu","name":"Mega menu","summary":"A panel of a few groups of links.","useWhen":"A site section has more links than a single row.","avoidWhen":"There are only a few links. Use the navbar.","snippet":"import { MegaMenu } from \"@/design-system\";\n\n<MegaMenu\n  groups={[\n    { title: \"Product\", links: [{ label: \"Overview\", href: \"/product\" }] },\n    { title: \"Learn\", links: [{ label: \"Guides\", href: \"/guides\" }] },\n  ]}\n/>","playground":true},{"slug":"app-switcher","name":"App switcher","summary":"A short list of products. Choosing one selects it in the preview.","useWhen":"The person can move between a few products.","avoidWhen":"There is only one product. Write its name.","snippet":"import { AppSwitcher } from \"@/design-system\";\n\n<AppSwitcher\n  value=\"onefold\"\n  products={[\n    { id: \"onefold\", name: \"Onefold\", detail: \"Studio\" },\n    { id: \"notes\", name: \"Notes\", detail: \"Pages\" },\n  ]}\n/>","playground":true},{"slug":"workspace-switcher","name":"Workspace switcher","summary":"The current workspace, plus others. Choosing one marks it current in the preview.","useWhen":"The person works in more than one workspace.","avoidWhen":"There is only one workspace. Write its name.","snippet":"import { WorkspaceSwitcher } from \"@/design-system\";\n\n<WorkspaceSwitcher\n  workspaces={[\n    { id: \"blue\", name: \"Blue app\", current: true },\n    { id: \"stone\", name: \"Stone site\" },\n    { id: \"quiet\", name: \"Quiet notes\" },\n  ]}\n/>","playground":true},{"slug":"image-gallery","name":"Image gallery","summary":"A few image frames together.","useWhen":"A page shows several pictures of the same thing.","avoidWhen":"There is one picture. Use an image frame.","snippet":"import { ImageGallery } from \"@/design-system\";\n\n<ImageGallery\n  images={[\n    { label: \"Cover\", caption: \"Blue app\" },\n    { label: \"Notes\", caption: \"Today\" },\n  ]}\n/>","playground":false},{"slug":"video-player","name":"Video player","summary":"A frame with play and a progress bar. Play toggles a local state. No video file is loaded.","useWhen":"A page shows a video the person can start.","avoidWhen":"You only need a still picture. Use an image frame.","snippet":"import { VideoPlayer } from \"@/design-system\";\n\n<VideoPlayer title=\"Theme walkthrough\" time=\"0:42\" duration=\"2:10\" />","playground":true},{"slug":"undo-redo","name":"Undo and redo","summary":"Two icon buttons for going back and forward.","useWhen":"An edit can be taken back.","avoidWhen":"The action cannot be undone. Do not offer the buttons.","snippet":"import { UndoRedo } from \"@/design-system\";\n\n<UndoRedo canUndo canRedo={false} />","playground":true},{"slug":"assistant-launcher","name":"Assistant launcher","summary":"A round button that opens the assistant.","useWhen":"The assistant should stay available from the corner of a page.","avoidWhen":"The chat is already open. Use the chat window.","snippet":"import { AssistantLauncher } from \"@/design-system\";\n\n<AssistantLauncher />","playground":true},{"slug":"chat-window","name":"Chat window","summary":"A transcript and a composer. Send is off until there is text. The reply stays in the page and says no model was called. Empty, writing, error, and draft start as display states.","useWhen":"The person is in a short conversation with the assistant.","avoidWhen":"They are asking one question with no history. Use the prompt field.","snippet":"import { ChatWindow } from \"@/design-system\";\n\n<ChatWindow status=\"empty\" lines={[]} />\n<ChatWindow lines={[{ from: \"You\", text: \"Can you check the roundness?\" }, { from: \"Onefold\", text: \"The card uses 12.\" }]} />\n<ChatWindow status=\"typing\" lines={[{ from: \"You\", text: \"Can you check the roundness?\" }]} />\n<ChatWindow status=\"error\" lines={[{ from: \"You\", text: \"Can you check the roundness?\" }]} />\n<ChatWindow status=\"draft\" lines={[]} draft=\"Can you look at the card layouts?\" />\n<ChatWindow lines={[{ from: \"You\", text: \"The cover, on the left.\", image: { label: \"Cover photo\" } }]} composer=\"arrow\" attachment={{ name: \"notes.pdf\" }} />","playground":true},{"slug":"button-group","name":"Button group","summary":"Two or more buttons in a row. One is the main action.","useWhen":"Onefold shows a main action beside quieter ones, like Save, Discard, and Cancel.","avoidWhen":"The row is a choice that stays selected. Use the segmented control.","snippet":"import { Button, ButtonGroup } from \"@/design-system\";\n\n<ButtonGroup>\n  <Button>Save</Button>\n  <Button variant=\"ghost\">Discard</Button>\n  <Button variant=\"outline\">Cancel</Button>\n</ButtonGroup>\n<ButtonGroup>\n  <Button>Save</Button>\n  <Button variant=\"ghost\">Discard</Button>\n</ButtonGroup>","playground":true},{"slug":"filter-input","name":"Filter input","summary":"A text field with a filter icon and a clear control.","useWhen":"Onefold lets a person narrow a list by typing, then clear that text.","avoidWhen":"They are looking up one known item. Use the search field.","snippet":"import { FilterInput } from \"@/design-system\";\n\n<FilterInput label=\"Filter\" defaultValue=\"Round\" />","playground":true},{"slug":"date-picker","name":"Date picker","summary":"A date field with the month open under it. Choosing a day writes that date into the field.","useWhen":"Onefold should show the month while a person picks a day.","avoidWhen":"A closed date is enough. Use the date field. The month on its own is the calendar month.","snippet":"import { DatePicker } from \"@/design-system\";\n\n<DatePicker label=\"Due\" defaultValue=\"2026-11-06\" month=\"November 2026\" today={6} />","playground":true},{"slug":"layout-grid","name":"Layout grid","summary":"Columns, a gutter, and a cell that spans.","useWhen":"A screen needs to show how the columns line up.","avoidWhen":"The rows are records. Use a table.","snippet":"import { LayoutGrid } from \"@/design-system\";\n\n<LayoutGrid />\n<LayoutGrid kind=\"app\" />\n<LayoutGrid kind=\"website\" />","playground":true},{"slug":"label","name":"Label","summary":"The visible name of a field, with an optional hint.","useWhen":"A control needs a name that sits above it.","avoidWhen":"The control already carries its own words, like a checkbox.","snippet":"import { Input, Label } from \"@/design-system\";\n\n<Label htmlFor=\"project\" hint=\"Shown on the navbar.\">Project name</Label>\n<Input id=\"project\" defaultValue=\"Blue app\" />","playground":true},{"slug":"graph","name":"Graph","summary":"A bar or line chart with axes, a legend, a tooltip, and a data table.","useWhen":"A count is easier to see as a shape than as one number, and the numbers must stay readable.","avoidWhen":"One number is enough. Use a metric tile.","snippet":"import { Graph } from \"@/design-system\";\n\n<Graph\n  label=\"Tasks this week\"\n  points={[\n    { label: \"Mon\", value: 3 },\n    { label: \"Tue\", value: 5 },\n    { label: \"Wed\", value: 2 },\n  ]}\n/>\n<Graph variant=\"line\" label=\"Tasks this week\" />","playground":true},{"slug":"bottom-app-bar","name":"Bottom app bar","summary":"A phone-width bar of one to four actions. One action can be emphasized.","useWhen":"The actions belong to the screen, and they are not the main places in the app.","avoidWhen":"The icons switch sections. Use bottom navigation.","snippet":"import { BottomAppBar } from \"@/design-system\";\n\n<BottomAppBar\n  actions={[\n    { label: \"Search\", icon: \"search\" },\n    { label: \"Edit\", icon: \"edit\" },\n    { label: \"Add\", icon: \"add\", emphasized: true },\n    { label: \"Share\", icon: \"share\" },\n  ]}\n/>","playground":false},{"slug":"carousel","name":"Carousel","summary":"One frame at a time, with previous and next that change the frame.","useWhen":"A few pictures or notes belong in one place, one at a time.","avoidWhen":"The person needs every frame at once. Use the image gallery.","snippet":"import { Carousel } from \"@/design-system\";\n\n<Carousel\n  index={1}\n  frames={[\n    { label: \"Field notes\" },\n    { label: \"Theme file\" },\n    { label: \"Type sample\" },\n  ]}\n/>","playground":true},{"slug":"floating-action-button","name":"Floating action button","summary":"One circular primary action, flat, with an optional short label.","useWhen":"The screen has a single main action, such as New task.","avoidWhen":"There are several equal actions. Use a button or the bottom app bar.","snippet":"import { FloatingActionButton } from \"@/design-system\";\n\n<FloatingActionButton label=\"New task\" />\n<FloatingActionButton label=\"New task\" labeled />","playground":true}],"themes":[{"id":"sable","name":"Blue app","project":"Blue app","primary":"#1035A3","accent":"#0E80F2","neutral":"slate","radius":14,"font":"outfit"},{"id":"kiln","name":"Shop","project":"Shop","primary":"#9A3412","accent":"#C2410C","neutral":"stone","radius":8,"font":"newsreader"},{"id":"grove","name":"Health notes","project":"Health notes","primary":"#1B4332","accent":"#2D6A4F","neutral":"stone","radius":18,"font":"montserrat"},{"id":"ink","name":"Editorial","project":"Editorial","primary":"#1C1917","accent":"#B45309","neutral":"stone","radius":4,"font":"newsreader"}]}