Components
Button
Basic interaction component to trigger user actions
Overview
Button triggers actions or events on click. Use it for form submissions, opening dialogs, executing operations, and more.
Variants
Use primary for the main action on a page, and secondary for supporting actions.
Size
Button has a single size: 40px tall with 12px padding. There is no size prop.
Full Width
Use isFullWidth to make the button span the full width of its parent container. Useful for mobile layouts or form footers.
Disabled State
A disabled button indicates that the action is unavailable in the current state.
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
variant | 'primary' | 'secondary' | 'primary' | No | Visual hierarchy. Use one primary per section. |
isFullWidth | boolean | false | No | Whether to fill the parent width |
disabled | boolean | false | No | Disabled |
type | 'button' | 'submit' | 'reset' | 'button' | No | Button type. Defaults to button, so it does not submit a form unless you say so. |
onClick | MouseEventHandler<HTMLButtonElement> | - | No | Click handler |
children | ReactNode | - | Yes | Button content |
className | string | - | No | Extra CSS class |
aria-label | string | - | No | Accessible name |
ref | Ref<HTMLButtonElement> | - | No | Ref to the button element |
Specification
base
| 상태 | 요소 | 속성 | 값 |
|---|---|---|---|
| enabled | root | borderRadius | $size.radius.200 |
| enabled | root | borderWidth | $size.stroke.border |
| enabled | root | typography | $text.singleLine.bodyBase |
| enabled | root | padding | $size.space.300 |
| enabled | root | height | 2.5rem토큰 아님 — no sizing token scale |
| enabled | label | color | $color.text.default.default |
| focusVisible | root | outlineWidth | $size.stroke.focus |
| focusVisible | root | outlineStyle | solid토큰 아님 — no line style token |
| focusVisible | root | outlineColor | $color.border.focus.default |
| focusVisible | root | outlineOffset | 2px토큰 아님 — no ring offset token; same as focusRingOutside in focusRing.ts |
variant=primary
| 상태 | 요소 | 속성 | 값 |
|---|---|---|---|
| enabled | root | backgroundColor | $color.background.brand.default |
| enabled | root | borderColor | $color.border.brand.default |
| enabled | label | color | $color.text.brand.onBrand |
| hover | root | backgroundColor | $color.background.brand.defaultHover |
| hover | label | color | $color.text.brand.onBrand |
| pressed | root | backgroundColor | $color.background.brand.defaultPressed |
| pressed | label | color | $color.text.brand.onBrand |
| disabled | root | backgroundColor | $color.background.disabled.default |
| disabled | root | borderColor | $color.border.disabled.default |
| disabled | label | color | $color.text.disabled.default |
variant=secondary
| 상태 | 요소 | 속성 | 값 |
|---|---|---|---|
| enabled | root | backgroundColor | $color.background.default.default |
| enabled | root | borderColor | $color.border.default.default |
| enabled | label | color | $color.text.brand.default |
| hover | root | backgroundColor | $color.background.default.defaultHover |
| hover | label | color | $color.text.default.default |
| pressed | root | backgroundColor | $color.background.default.defaultPressed |
| pressed | label | color | $color.text.default.default |
| disabled | root | backgroundColor | $color.background.disabled.default |
| disabled | root | borderColor | $color.border.disabled.default |
| disabled | label | color | $color.text.disabled.default |
Usage Guidelines
Do
- Use a primary button for the most important action on a page
- Use secondary buttons for supporting or less important actions
- Keep button labels concise and action-oriented
Don't
- Don't use more than one primary button per section
- Don't disable a button without explaining the reason
- Don't use generic labels like "Click here"