타이포그래피 토큰 (Typography Tokens)
Shoelace의 타이포그래피 토큰은 앱 전체에서 일관된 글꼴 스타일을 유지하는 데 사용해요. 글꼴 종류, 크기, 두께, 자간, 줄간격을 토큰 하나로 통일해서 관리할 수 있어요.
출처: 문서
본문
타이포그래피 토큰은 앱 전체에서 일관된 글꼴 스타일 세트를 유지하는 데 사용돼요.
Font Family
기본 글꼴 스택은 가능한 한 많은 기기에서 동작하도록 단순하게 설계돼 있어요.
| Token | Value | Example |
|---|---|---|
--sl-font-sans |
-apple-system, BlinkMacSystemFont, ‘Segoe UI’, Roboto, Helvetica, Arial, sans-serif, ‘Apple Color Emoji’, ‘Segoe UI Emoji’, ‘Segoe UI Symbol’ | The quick brown fox jumped over the lazy dog. |
--sl-font-serif |
Georgia, ‘Times New Roman’, serif | The quick brown fox jumped over the lazy dog. |
--sl-font-mono |
SFMono-Regular, Consolas, ‘Liberation Mono’, Menlo, monospace; | The quick brown fox jumped over the lazy dog. |
Font Size
글꼴 크기는 rem 단위를 쓰기 때문에 기본 글꼴 크기에 맞춰 함께 커지고, 표시된 픽셀 값은 16px 글꼴 크기를 기준으로 한 값이에요.
| Token | Value | Example |
|---|---|---|
--sl-font-size-2x-small |
0.625rem (10px) | Aa |
--sl-font-size-x-small |
0.75rem (12px) | Aa |
--sl-font-size-small |
0.875rem (14px) | Aa |
--sl-font-size-medium |
1rem (16px) | Aa |
--sl-font-size-large |
1.25rem (20px) | Aa |
--sl-font-size-x-large |
1.5rem (24px) | Aa |
--sl-font-size-2x-large |
2.25rem (36px) | Aa |
--sl-font-size-3x-large |
3rem (48px) | Aa |
--sl-font-size-4x-large |
4.5rem (72px) | Aa |
Font Weight
| Token | Value | Example |
|---|---|---|
--sl-font-weight-light |
300 | The quick brown fox jumped over the lazy dog. |
--sl-font-weight-normal |
400 | The quick brown fox jumped over the lazy dog. |
--sl-font-weight-semibold |
500 | The quick brown fox jumped over the lazy dog. |
--sl-font-weight-bold |
700 | The quick brown fox jumped over the lazy dog. |
Letter Spacing
| Token | Value | Example |
|---|---|---|
--sl-letter-spacing-denser |
-0.03em | The quick brown fox jumped over the lazy dog. |
--sl-letter-spacing-dense |
-0.015em | The quick brown fox jumped over the lazy dog. |
--sl-letter-spacing-normal |
normal | The quick brown fox jumped over the lazy dog. |
--sl-letter-spacing-loose |
0.075em | The quick brown fox jumped over the lazy dog. |
--sl-letter-spacing-looser |
0.15em | The quick brown fox jumped over the lazy dog. |
Line Height
| Token | Value | Example |
|---|---|---|
--sl-line-height-denser |
1 | The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog. |
--sl-line-height-dense |
1.4 | The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog. |
--sl-line-height-normal |
1.8 | The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog. |
--sl-line-height-loose |
2.2 | The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog. |
--sl-line-height-looser |
2.6 | The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog.The quick brown fox jumped over the lazy dog. |
더 알아보기 (Learn more)
- Shoelace 색상 토큰 — 테마 색과 원색 팔레트 문서
- Shoelace 간격 토큰 — 일관된 여백을 만드는 토큰 문서
- Shoelace 테마 커스터마이징 — 디자인 토큰을 직접 바꾸는 방법