This guide is for agents, code generators, and vibe-coding workflows that need to produce UI using calmo-ui.
Use Calmo UI to generate calm, mobile-first product surfaces with a fintech-friendly interaction model.
The target feel is:
- quiet
- compact but breathable
- neutral-first with a single accent
- highly structured
- low-friction and low-noise
When an agent starts from zero, it should read these files in order:
docs/AI_USAGE.mddocs/AI_PROMPT_TEMPLATE.mdai/components.jsonai/patterns.jsonai/anti-patterns.json
If time is limited, at minimum read:
ai/components.jsonai/patterns.jsonai/anti-patterns.json
- Prefer neutral surfaces over colorful ones.
- Use one primary action per screen or section.
- Use accent color to indicate intent, not decoration.
- Keep information hierarchy shallow.
- Avoid nested cards unless a modal, sheet, or preview truly requires it.
- Use short labels and short supporting text.
- Use overlays sparingly and for focused decisions.
- Prefer list rows and banners over custom card compositions when showing structured information.
TopBarfor page headersSectionHeaderfor section introductionsCardorSurfacefor bounded contentButtonfor CTAList,ListRow,TableRow,InfoRowfor structured informationBannerorNoticeBannerfor status or alertsDialog,BottomSheet,Snackbar,Toastfor temporary feedback or decisions
- multiple primary buttons in the same narrow viewport
- large decorative gradients
- nested elevated cards inside elevated cards
- long paragraphs inside banners
- using
Badgeas a main CTA - mixing
Tabs,SegmentedControl, andSelectorin one control zone
- A component should feel responsive within 120-180ms for press feedback.
- Motion should be small and directional.
- Overlays should not block more than necessary.
- Searchable controls should support keyboard navigation.
- Interactive previews should demonstrate real behavior, not static screenshots.
- Titles should be short and noun-first.
- Supporting descriptions should fit within one to two lines.
- Validation messages should be precise and action-oriented.
- Status copy should be concrete, e.g.
Saved successfully.instead ofOperation completed.
- Use
TopBarfor page-level navigation - Use
Tabsfor view switches - Use
SegmentedControlfor mode switches - Use
Selectorfor compact local toggles
- Use
Inputfor single line text - Use
TextAreafor long-form entry - Use
SearchFieldfor in-context filtering - Use
SearchBarfor page-level search - Use
Selectfor list selection - Use
DatePickerfor date picking - Use
Switch,Checkbox,Radiofor binary or choice input
- Use
Snackbarfor temporary global confirmation - Use
Toastfor compact inline feedback - Use
BannerorNoticeBannerfor persistent page-level information - Use
LoaderorSkeletonwhile content is loading
- Use
Dialogfor focused centered decisions - Use
AlertDialogfor single acknowledgment flows - Use
ConfirmDialogfor destructive or irreversible confirmation - Use
BottomSheetfor mobile-first secondary flows - Use
Popover,Menu,Dropdownfor anchored local actions - Use
CommandPalettefor command search and launch
Use these defaults unless the prompt strongly implies otherwise:
Button:variant="primary",size="medium"Badge:tone="neutral",variant="soft"Input:variant="default",size="md"Card: default tone and radiusDialog:size="md"BottomSheet:size="md"Tabs:stretch={true}on mobile-width layoutsSnackbar:align="left"
Do not generate:
- random custom CSS for buttons when a Calmo UI button exists
- ad hoc modal layouts when
DialogorBottomSheetfits - icon-only controls without
aria-label - more than one stacked persistent banner in the same section
- giant hero marketing sections for internal/product tools
TopBarSectionHeaderListListRowSwitchButton
DialogTextButton
TopBarSearchBarBannerListListRowPagination
TopBarSectionHeaderCardTableRowTableTabs
Always prefer explicit imports from calmo-ui.
Example:
import { Button, Card, SectionHeader, Stack, Text } from "calmo-ui";When generating UI with Calmo UI:
- Prefer existing primitives over custom wrappers.
- Use the machine-readable catalog in
/ai/components.json. - Use the page patterns in
/ai/patterns.json. - Use
/ai/anti-patterns.jsonto avoid invalid compositions. - If a requested design conflicts with Calmo UI principles, produce the closest calm, structured alternative.
- If uncertain between two components, choose the simpler one.
- Prefer
calmoThemePresetsbefore inventing a new palette. - If a custom theme is needed, use only
ThemeProviderwithaccent,ink, andbg. - Keep success, warning, and danger semantic colors distinct.
- Do not hardcode random brand colors into component-level CSS.
When producing code with Calmo UI, the best output is:
- imports
- one React component
- only minimal custom CSS
- clear component composition using Calmo primitives
Avoid long prose inside the generated answer unless the user explicitly asks for explanation.