Shapes
DDS의 Shape 토큰은 컴포넌트의 border-radius 값을 일관되게 관리합니다.
Installation
Terminal
$ pnpm add @b1nd/dodam-design-system/shapes
Usage
Emotion / Styled-Components
tsx
import styled from "@emotion/styled";import { shapes } from "@b1nd/dodam-design-system/shapes";const Card = () => (<Div>Content</Div>);const Div = styled.div`border-radius: ${shapes.large};`;
Tailwind CSS
css
/* globals.css */@import "@b1nd/dodam-design-system/shapes/tokens.tailwind.css";
tsx
// 사용 예시<div className="rounded-medium">Content</div>
Tokens
| Token | Value | Preview |
|---|---|---|
extraSmall | 8px | |
small | 10px | |
medium | 12px | |
large | 18px | |
extraLarge | 28px |
Examples
카드 컴포넌트
tsx
import { shapes } from "@b1nd/dodam-design-system/shapes";const Card = ({ children }) => (<divstyle={{borderRadius: shapes.large,padding: "20px",backgroundColor: colors.background.surface,}}>{children}</div>);
카드 컨텐츠
shapes.large (18px) 적용
버튼
tsx
import { shapes } from "@b1nd/dodam-design-system/shapes";const Button = ({ children }) => (<buttonstyle={{borderRadius: shapes.small,padding: "8px 16px"}}>{children}</button>);
Pill / Chip
tsx
import { shapes } from "@b1nd/dodam-design-system/shapes";const Chip = ({ children }) => (<spanstyle={{borderRadius: shapes.extraLarge,padding: "4px 12px"}}>{children}</span>);
Chip Label
Another Chip