|
3 | 3 |
|
4 | 4 | ## Examples |
5 | 5 | ### Body text |
6 | | -Use the predefined text size tokens like `text:sm`, `text:md`, and `text:lg` to set the body text of an element. |
7 | | -<Demo $py={0}> |
8 | | - <DemoPanel className="flex flex-col gap:8x w:full"> |
9 | | - <div className="w:full"> |
10 | | - <DemoLabel>text:sm</DemoLabel> |
11 | | - <DemoP className="text:sm">Design is not just about aesthetics—it’s about communication. Proper font sizes and spacing help present information clearly and improve usability.</DemoP> |
12 | | - </div> |
13 | | - <div className="w:full"> |
14 | | - <DemoLabel>text:md</DemoLabel> |
15 | | - <DemoP className="text:md">Design is not just about aesthetics—it’s about communication. Proper font sizes and spacing help present information clearly and improve usability.</DemoP> |
16 | | - </div> |
17 | | - <div className="w:full"> |
18 | | - <DemoLabel>text:lg</DemoLabel> |
19 | | - <DemoP className="text:lg">Design is not just about aesthetics—it’s about communication. Proper font sizes and spacing help present information clearly and improve usability.</DemoP> |
20 | | - </div> |
21 | | - </DemoPanel> |
22 | | -</Demo> |
23 | | -```html |
24 | | -<!-- @MARK text:sm --> |
25 | | -<p class="text:sm">Design is not just about aesthetics—it’s...</p> |
26 | | -<!-- @MARK text:md --> |
27 | | -<p class="text:md">Design is not just about aesthetics—it’s...</p> |
28 | | -<!-- @MARK text:lg --> |
29 | | -<p class="text:lg">Design is not just about aesthetics—it’s...</p> |
30 | | -``` |
| 6 | +<BodyText /> |
31 | 7 | If you don’t want to include line height, use the [`font:<size>`](/reference/font-size). |
32 | 8 |
|
33 | 9 | ### Headings |
34 | | -Use the predefined text size tokens like `text:xl`, `text:2xl`, and `text:3xl` to set the headings of an element. |
35 | | -<Demo $py={0}> |
36 | | - <DemoPanel className="flex flex-col gap:8x w:full"> |
37 | | - <div className="w:full"> |
38 | | - <DemoLabel>text:xl</DemoLabel> |
39 | | - <DemoP className="text:pretty font:medium text:xl">Shifting Dimensions Unfold Gently Beneath Layers of Balanced Design.</DemoP> |
40 | | - </div> |
41 | | - <div className="w:full"> |
42 | | - <DemoLabel>text:2xl</DemoLabel> |
43 | | - <DemoP className="text:pretty font:medium text:2xl">Shifting Dimensions Unfold Gently Beneath Layers of Balanced Design.</DemoP> |
44 | | - </div> |
45 | | - <div className="w:full"> |
46 | | - <DemoLabel>text:3xl</DemoLabel> |
47 | | - <DemoP className="text:pretty font:medium text:3xl">Shifting Dimensions Unfold Gently Beneath Layers of Balanced Design.</DemoP> |
48 | | - </div> |
49 | | - </DemoPanel> |
50 | | -</Demo> |
51 | | -```html |
52 | | -<!-- @MARK text:xl --> |
53 | | -<h1 class="text:xl">Design is not just about aesthetics—it’s...</h1> |
54 | | -<!-- @MARK text:2xl --> |
55 | | -<h1 class="text:2xl">Design is not just about aesthetics—it’s...</h1> |
56 | | -<!-- @MARK text:3xl --> |
57 | | -<h1 class="text:3xl">Design is not just about aesthetics—it’s...</h1> |
58 | | -``` |
| 10 | +<Headings /> |
| 11 | + |
| 12 | +### Page titles, hero sections |
| 13 | +<PageTitles /> |
59 | 14 |
|
60 | 15 | --- |
61 | 16 |
|
|
0 commit comments