Button Color Presets
Color presets apply a background fill and matching foreground color to a button element. Choose the class that matches the intent of the action.| Class | Color | Usage |
|---|---|---|
.button-primary | Primary blue (#0740f9) | Main actions |
.button-secondary | Light blue (#aaebfd) | Secondary actions |
.button-neutral | Gray (#6b7280) | Cancel, tertiary actions |
.button-success | Green (#3DC13C) | Confirm, publish |
.button-warning | Yellow (#F4BB1B) | Review, caution |
.button-error | Red (#F13737) | Delete, destructive |
Button Size Modifiers
Size modifiers adjust the padding and font scale of a button. They are designed to be combined with a color preset — applying a size class alone has no effect.| Class | Usage |
|---|---|
.button-xs | Very compact |
.button-sm | Compact |
.button-md | Default |
.button-lg | Prominent |
.button-xl | Hero-scale |
Code Examples
Basic usage
Apply a color preset on its own for default sizing:Combining with utility classes
Button presets work alongside AtomicKit’s layout and spacing utilities. Wrap buttons in a flex container to control alignment and gap:Notes
- Every button starts with a semantic color preset. The color class is always required — it provides the base styles that size modifiers extend.
- Size classes only work when paired with a color preset. Applying
.button-lgwithout a color class has no visible effect. .button-secondaryuses a light fill (#aaebfd). Add a dark text utility such astext-blackortext-gray-darkalongside it to ensure legible contrast.- You can still add spacing, layout, or typography utilities alongside presets. Button preset classes do not conflict with AtomicKit utility classes — combine them freely.