Components
Card
List item container for a task card
Overview
Card is the container of a list item. It renders as a <li> element with fixed card styles.
- Container, not a button — a card holds inputs and selectors, so it has no
role="button"and does not take focus. Border on hover - Opening — clicking an empty area calls
onClickas a mouse shortcut. Keyboard users do the same through the controls inside and the card's context menu (Shift+F10or the Menu key on any control inside opens it under that control) - Fixed props — takes
onClick,maxWidth,classNameandchildrenonly - Fixed styles — White background, rounded corners, drop shadow
Basic Usage
Width Control
The Basic Usage example above sets maxWidth="480px".
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
onClick | MouseEventHandler<HTMLElement> | - | Yes | Called when an empty area of the card is clicked with a mouse (a shortcut). Keyboard users do the same through the context menu |
maxWidth | string | number | - | No | Maximum width |
className | string | - | No | Extra CSS class |
children | ReactNode | - | Yes | Card content |
Specification
base
| 상태 | 요소 | 속성 | 값 |
|---|---|---|---|
| enabled | root | padding | $size.space.600 |
| enabled | root | gap | $size.space.400 |
| enabled | root | borderRadius | $size.radius.200 |
| enabled | root | backgroundColor | $color.background.default.default |
| enabled | root | borderWidth | $size.stroke.border |
| enabled | root | borderColor | $color.background.default.default |
| hover | root | borderColor | $color.border.default.default |
Guidelines
- Always use Card inside a
<ul>or<ol>(renders as<li>) - If you need a non-clickable container, use Box directly