v0.1 · shadcn/ui + Motion + Solar

Craft UI

Components for Webcraftsman web apps — built on shadcn/ui with snappy spring motion, Solar icons and Thai data support out of the box

Get started

Paste the setup prompt and describe what you want — the agent reads the rules, installs, and builds pages to the Craft standard

Setup prompt

Copy it into your agent

Works with any AI agent that can read files and run commands

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Gemini CLI
  • Windsurf
  • v0
  • and others
1

Paste the setup prompt

Into an agent running in your project — works for new and existing projects

Set up Craft UI in this project.

1. Read https://ui.webcraftsman.co/design.md and follow it for all UI work in this project.
2. If components.json doesn't exist, run `npx shadcn@latest init` first.
3. Add the registry to components.json:
   "registries": { "@craft": "https://ui.webcraftsman.co/r/{name}.json" }
4. Install the foundation: `npx shadcn@latest add @craft/foundation`
5. In the root layout, set <html lang="en" suppressHydrationWarning> and wrap the app in <Providers> from "@/components/providers".
6. Add this rule to the project's agent rules file (CLAUDE.md, AGENTS.md or .cursor/rules):
   For all UI work, follow https://ui.webcraftsman.co/design.md. Install components only from the @craft registry (`npx shadcn@latest add @craft/<name>`) — never hand-roll components, other icon sets, or native browser controls.
7. Run the app, confirm it builds, then tell me what you changed.
2

Make the agent remember the rules

The setup prompt adds this line for you — or paste it into CLAUDE.md, AGENTS.md or .cursor/rules yourself

For all UI work, follow https://ui.webcraftsman.co/design.md. Install components only from the @craft registry (`npx shadcn@latest add @craft/<name>`) — never hand-roll components, other icon sets, or native browser controls.

Colour

Every semantic token derives from a single --brand-h, so the brand colour changes in one place

Aa Sample
--background
Aa Sample
--primary
Aa Sample
--secondary
Aa Sample
--accent
Aa Sample
--muted
Aa Sample
--destructive
Aa Sample
--success
Aa Sample
--warning
chart-1
chart-2
chart-3
chart-4
chart-5

Typography

Outfit for Latin · Prompt as the Thai fallback for Thai data · IBM Plex Mono for codes and numbers

Revenue overview

Section heading

Body text at 16px for paragraphs, with 1.65 line height so stacked Thai vowels and tone marks never collide

Thai text (Prompt fallback): ภาพรวมยอดขาย “ปิ่น ญาติ ฎีกา ฐาน ฤๅษี”

Secondary text at 14px — used for most UI (labels, cells, descriptions)

ORD-24081 · ฿1,284,500.00 · 2026-09-30

Motion

Snappy spring 150–320ms · motion must always explain a state change, never decoration alone · respects prefers-reduced-motion

spring.snappydefault · press, toggle, pop-in
spring.gentlelarge surfaces, layout
spring.bouncyicon swaps, checkmarks
ease.out · slowedge panels, progress, counters

Solar icons

Linear by default, Bold when active via <Icon> · Bold Duotone for empty states only

LinearDefault — everywhere
BoldActive / selected state
Bold DuotoneEmpty states, feature tiles
Line DuotoneDon't use
OutlineDon't use
BrokenDon't use

Components

49 components with motion — install one at a time from the registry

Button
Actions. One primary per view.
Input
Single-line text field. Pair with Label above.
Input Group
Input with icon, text or button addons.
Textarea
Multi-line text field.
Field
Label + control + description + error, with validation state.
FormCraft
react-hook-form + zod wired into Field; validators (incl. Thai mobile, national ID and tax ID) in lib/validation.
Calendar
Month grid — en-GB and Monday-first by default (Buddhist era + Sunday-first optional), Arabic digits. Click the caption for a month/year grid; Today jumps back.
Date PickerCraft
Typeable DateInput, DatePicker and DateRangePicker (presets incl. fiscal year, hover preview, max span).
Label
Accessible label for form controls.
Select
Pick one option from a short list (≤ 12).
Combobox
Searchable select built from Popover + Command.
Checkbox
Independent on/off choices, multi-select.
Switch
Settings that apply immediately.
Radio Group
One choice from 2–5 visible options.
Toggle Group
Segmented control for views and ranges.
Dialog
Blocking confirmation or short focused task.
Sheet
Bottom sheet on phones, side panel on desktop — for create/edit forms and details.
Dropdown Menu
Contextual actions behind a trigger.
Popover
Non-blocking floating content.
Tooltip
Short label for icon-only controls.
Tabs
Switch between peer views in one context.
Accordion
Collapsible sections — FAQs, advanced settings.
Card
Groups related content and actions.
Badge
Status and counts.
Avatar
Person or organisation; Thai initials supported.
Table
Tabular data with tabular numbers.
Breadcrumb
Location within the app hierarchy.
Toast (Sonner)
Async feedback after an action.
Alert
Inline, persistent message in the page.
Progress
Determinate progress toward a goal.
Skeleton
Placeholder while content loads (> 300ms).
Separator
Visual divider.
Chart
Recharts wrapper themed with --chart-* tokens.
Sidebar
App navigation; see the App Shell block.
IconCraft
Solar icon with animated Linear → Bold swap for state.
LogoCraft
Webcraftsman mark (#2F3EE3) and mark + wordmark lockup.
KbdCraft
Keyboard keys and shortcuts (⌘K, G then O).
Status BadgeCraft
Record status: dot + label, 5 tones; `live` pulses for in-progress states.
Multi SelectCraft
Pick several values; chips in the trigger, search, groups, select all / clear.
File DropzoneCraft
Drag/drop/paste upload with per-file progress, errors, retry and rejection reasons.
StepperCraft
Progress through a multi-step flow; jump back to completed steps.
TimelineCraft
Activity feed / order history with relative time.
SpinnerCraft
Indeterminate loading inside buttons and toasts.
Animated NumberCraft
KPI value that counts up when it enters view.
Count BadgeCraft
Unread / cart counts on icons.
Empty StateCraft
Nothing to show — explain why and offer a next step.
Action ButtonCraft
Button that runs an async action and morphs through loading → success / error, then resets. For save, copy, send.
Dynamic IslandCraft
Floating glass pill that resizes to fit what it shows (status, selection, progress). Powers the data-table bulk bar.
HapticsCraft
Phone haptics (web-haptics) built into buttons, toggles, tabs, toasts and invalid fields, plus the viewer on/off setting.