Skip to content

stratum-uikit add

stratum-uikit add copies a component — and all the components it depends on — into your project as source files you own.

Terminal window
npx stratum-uikit add <layer>/<ComponentName>

Run stratum-uikit init first if you haven’t already.

Terminal window
npx stratum-uikit add atom/Button
npx stratum-uikit add atom/Input
npx stratum-uikit add atom/Card
npx stratum-uikit add molecule/FormField
npx stratum-uikit add molecule/SettingsRow
npx stratum-uikit add molecule/SearchBar
npx stratum-uikit add organism/AuthForm
npx stratum-uikit add organism/SettingsGroup
npx stratum-uikit add organism/TopNavBar
npx stratum-uikit add template/AuthLayout
npx stratum-uikit add template/SettingsLayout

Stratum components depend on each other. add resolves the full dependency tree automatically — you only need to name the component you want:

Terminal window
npx stratum-uikit add organism/AuthForm
Adding organism/AuthForm...
Files created:
✓ src/components/1-atoms/Input.tsx (dependency)
✓ src/components/2-molecules/FormField.tsx (dependency)
✓ src/components/3-organisms/AuthForm.tsx
Skipped (already exist):
– src/components/1-atoms/Text.tsx (dependency)
– src/components/1-atoms/Button.tsx (dependency)
FlagDescription
--overwriteReplace files that already exist in your project

By default, existing files are skipped. This is safe to re-run after updating the CLI.

KeyDescription
atom/BadgeStatus labels — success, warning, error, info, neutral
atom/ButtonPrimary, secondary, ghost, outline, destructive
atom/CardThemed container with shadow and padding scale
atom/CheckboxAccessible checkbox with label
atom/ChipCompact tag — filled or outline, optional dismiss
atom/HeadingHeading levels 1–4
atom/IconPhosphor icon wrapper — size and color from theme
atom/IconButtonIcon-only pressable with accessibility label
atom/InputSingle-line text input
atom/RadioRadio button with label
atom/SliderRange slider
atom/SurfaceUniversal themed container (handles Quartz BlurView)
atom/SwitchToggle switch
atom/TextBody text with semantic variants
atom/TextAreaMulti-line text input
KeyDescription
molecule/FormFieldInput + label + error — above or floating label
molecule/ListItemContent list row with optional icon and accessory
molecule/SearchBarSearch input with icon, clearable
molecule/SettingsRowPreference row — switch, chevron, value, or badge
molecule/TagInputMulti-value tag input
molecule/ToggleRowLabeled switch row
KeyDescription
organism/AuthFormLogin/register form — controlled, email + password
organism/ListSectionTitled list of ListItem rows
organism/SettingsGroupTitled group of SettingsRow molecules
organism/TopNavBarNavigation bar with title, back, and action buttons
KeyDescription
template/AuthLayoutFull-screen auth shell with logo, title, content slots
template/SettingsLayoutSettings/detail screen shell with nav bar + scroll

add reads stratum.config.json to find your component directory, resolves the dependency graph from the built-in manifest, and copies source .tsx files into your project. You own these files — modify them freely.

Files use @/ imports (@/tokens, @/components, @/hooks) which resolve correctly as long as you have the @/*: ["./src/*"] path alias in tsconfig.json.