dodam dodam logo

B1ND Docs

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

TokenValuePreview
extraSmall8px
small10px
medium12px
large18px
extraLarge28px

Examples

카드 컴포넌트

tsx
import { shapes } from "@b1nd/dodam-design-system/shapes";
const Card = ({ children }) => (
<div
style={{
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 }) => (
<button
style={{
borderRadius: shapes.small,
padding: "8px 16px"
}}
>
{children}
</button>
);

Pill / Chip

tsx
import { shapes } from "@b1nd/dodam-design-system/shapes";
const Chip = ({ children }) => (
<span
style={{
borderRadius: shapes.extraLarge,
padding: "4px 12px"
}}
>
{children}
</span>
);

Chip Label

Another Chip