Source of Truth
@clawcontrol/uiButtonandbuttonLikeClass@clawcontrol/uiSegmentedToggle@clawcontrol/uiSelectDropdownandDropdownMenu- Legacy CSS classes (
.btn-primary,.btn-secondary) are compatibility-only and should not be used in new code.
Button Variants
primary: main positive action on a surfacesecondary: neutral actionsghost: low-emphasis actionsdanger: destructive actions (delete, uninstall, hard reject)
Button Sizes
xs: dense controls and compact toolbarssm: default page header actionsmd: modal footer and form actionsicon: icon-only button layout
Segmented Toggles
tone="neutral": tabs/view switches such as Agents/Teams/Stations or List/Hierarchytone="accent": when selected state should be emphasized (for example compact layout mode toggles)
Dropdowns and Menus
SelectDropdown: value selection controls in toolbars, forms, modals, and cardstone="toolbar": compact filter/sort controlstone="field": standard form/editor controls- Keyboard contract:
ArrowUp/Down,Enter,Escape,role="listbox"/role="option" - Search defaults to
search="auto"and appears for larger option sets
DropdownMenu: action menus (for example “New File / New Folder”)- Keyboard contract:
role="menu"/role="menuitem" - Use semantic danger menu items for destructive actions only
- Prefer portal-based rendering to avoid clipping in scroll containers
- Keyboard contract:
Do / Don’t
- Do use
Buttonfor user-facing actions on pages, drawers, and modal footers. - Do use
buttonLikeClassfor anchor/label elements that must look like buttons. - Do use
SegmentedToggleinstead of hand-rolled segmented button groups. - Do use
SelectDropdowninstead of native<select>for primary app controls. - Do use
DropdownMenuinstead of ad-hoc absolute-positioned popovers. - Don’t add new
btn-primary/btn-secondaryusage. - Don’t use ad-hoc action classes for non-danger actions.
- Don’t introduce new native OS dropdowns for primary app controls.
Exceptions
- Tiny icon-only utility controls (dismiss, collapse, row affordances) may remain bespoke if they are not primary user actions.
- Semantic status badges are not action buttons and are not covered by this spec.