Typography
Documentation and examples for Franken UI typography, including headings, body text, lists, and more.
-
The Joke Tax Chronicles
Once upon a time, in a far-off land, there was a very lazy king who spent all day lounging on his throne. One day, his advisors came to him with a problem: the kingdom was running out of money.
The King's Plan
The king thought long and hard, and finally came up with a brilliant plan: he would tax the jokes in the kingdom.
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
The Joke Tax
The king's subjects were not amused. They grumbled and complained, but the king was firm:
- 1st level of puns: 5 gold coins
- 2nd level of jokes: 10 gold coins
- 3rd level of one-liners : 20 gold coins
As a result, people stopped telling jokes, and the kingdom fell into a gloom. But there was one person who refused to let the king's foolishness get him down: a court jester named Jokester.
Jokester's Revolt
Jokester began sneaking into the castle in the middle of the night and leaving jokes all over the place: under the king's pillow, in his soup, even in the royal toilet. The king was furious, but he couldn't seem to stop Jokester.
And then, one day, the people of the kingdom discovered that the jokes left by Jokester were so funny that they couldn't help but laugh. And once they started laughing, they couldn't stop.
The People's Rebellion
The people of the kingdom, feeling uplifted by the laughter, started to tell jokes and puns again, and soon the entire kingdom was in on the joke.
King's Treasury People's happiness Empty Overflowing Modest Satisfied Full Ecstatic The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax. Jokester was declared a hero, and the kingdom lived happily ever after.
The moral of the story is: never underestimate the power of a good laugh and always be careful of bad ideas.
-
Something's not working? Feel free to report an issue or edit this snippet .
<h1 class="uk-h1">The Joke Tax Chronicles</h1><p class="uk-text-lead mt-4">Once upon a time, in a far-off land, there was a very lazy king who spent allday lounging on his throne. One day, his advisors came to him with a problem:the kingdom was running out of money.</p><h2 class="uk-h2 mt-4">The King's Plan</h2><p class="uk-paragraph">The king thought long and hard, and finally came up with a<a class="uk-link" href="#">brilliant plan</a>: he would tax the jokes in thekingdom.</p><blockquote class="uk-blockquote">"After all," he said, "everyone enjoys a good joke, so it's only fair thatthey should pay for the privilege."</blockquote><h3 class="uk-h3 mt-4">The Joke Tax</h3><p class="uk-paragraph">The king's subjects were not amused. They grumbled and complained, but theking was firm:</p><ul class="uk-list uk-list-disc mt-4"><li>1st level of puns: 5 gold coins</li><li>2nd level of jokes: 10 gold coins</li><li>3rd level of one-liners : 20 gold coins</li></ul><p class="uk-paragraph">As a result, people stopped telling jokes, and the kingdom fell into a gloom.But there was one person who refused to let the king's foolishness get himdown: a court jester named Jokester.</p><h3 class="uk-h3 mt-4">Jokester's Revolt</h3><p class="uk-paragraph">Jokester began sneaking into the castle in the middle of the night and leavingjokes all over the place: under the king's pillow, in his soup, even in theroyal toilet. The king was furious, but he couldn't seem to stop Jokester.</p><p class="uk-paragraph">And then, one day, the people of the kingdom discovered that the jokes left byJokester were so funny that they couldn't help but laugh. And once theystarted laughing, they couldn't stop.</p><h3 class="uk-h3 mt-4">The People's Rebellion</h3><p class="uk-paragraph">The people of the kingdom, feeling uplifted by the laughter, started to telljokes and puns again, and soon the entire kingdom was in on the joke.</p><table class="uk-table uk-table-divider uk-table-striped mt-4"><thead><tr><th>King's Treasury</th><th>People's happiness</th></tr></thead><tbody><tr><td>Empty</td><td>Overflowing</td></tr><tr><td>Modest</td><td>Satisfied</td></tr><tr><td>Full</td><td>Ecstatic</td></tr></tbody></table><p class="uk-paragraph">The king, seeing how much happier his subjects were, realized the error of hisways and repealed the joke tax. Jokester was declared a hero, and the kingdomlived happily ever after.</p><p class="uk-paragraph">The moral of the story is: never underestimate the power of a good laugh andalways be careful of bad ideas.</p> -
Something's not working? Feel free to report an issue or edit this snippet .
<div><h1 className="uk-h1">The Joke Tax Chronicles</h1><p className="uk-text-lead mt-4">Once upon a time, in a far-off land, there was a very lazy king who spent allday lounging on his throne. One day, his advisors came to him with a problem:the kingdom was running out of money.</p><h2 className="uk-h2 mt-4">The King's Plan</h2><p className="uk-paragraph">The king thought long and hard, and finally came up with a<a className="uk-link" href="#">brilliant plan</a>: he would tax the jokes in thekingdom.</p><blockquote className="uk-blockquote">"After all," he said, "everyone enjoys a good joke, so it's only fair thatthey should pay for the privilege."</blockquote><h3 className="uk-h3 mt-4">The Joke Tax</h3><p className="uk-paragraph">The king's subjects were not amused. They grumbled and complained, but theking was firm:</p><ul className="uk-list uk-list-disc mt-4"><li>1st level of puns: 5 gold coins</li><li>2nd level of jokes: 10 gold coins</li><li>3rd level of one-liners : 20 gold coins</li></ul><p className="uk-paragraph">As a result, people stopped telling jokes, and the kingdom fell into a gloom.But there was one person who refused to let the king's foolishness get himdown: a court jester named Jokester.</p><h3 className="uk-h3 mt-4">Jokester's Revolt</h3><p className="uk-paragraph">Jokester began sneaking into the castle in the middle of the night and leavingjokes all over the place: under the king's pillow, in his soup, even in theroyal toilet. The king was furious, but he couldn't seem to stop Jokester.</p><p className="uk-paragraph">And then, one day, the people of the kingdom discovered that the jokes left byJokester were so funny that they couldn't help but laugh. And once theystarted laughing, they couldn't stop.</p><h3 className="uk-h3 mt-4">The People's Rebellion</h3><p className="uk-paragraph">The people of the kingdom, feeling uplifted by the laughter, started to telljokes and puns again, and soon the entire kingdom was in on the joke.</p><table className="uk-table uk-table-divider uk-table-striped mt-4"><thead><tr><th>King's Treasury</th><th>People's happiness</th></tr></thead><tbody><tr><td>Empty</td><td>Overflowing</td></tr><tr><td>Modest</td><td>Satisfied</td></tr><tr><td>Full</td><td>Ecstatic</td></tr></tbody></table><p className="uk-paragraph">The king, seeing how much happier his subjects were, realized the error of hisways and repealed the joke tax. Jokester was declared a hero, and the kingdomlived happily ever after.</p><p className="uk-paragraph">The moral of the story is: never underestimate the power of a good laugh andalways be careful of bad ideas.</p></div>
Headings
Add one of the following classes to modify the size and style of headings. Usually, these classes would be used on heading elements, but they work also with any other element like a div
element.
Class | Description |
---|---|
.uk-h1 | Add this class to apply an h1 heading. |
.uk-h2 | Add this class to apply an h2 heading. |
.uk-h3 | Add this class to apply an h3 heading. |
.uk-h4 | Add this class to apply an h4 heading. |
-
h1
h2
h3
h4
-
Something's not working? Feel free to report an issue or edit this snippet .
<h1 class="uk-h1 mt-4">h1</h1><h1 class="uk-h2 mt-4">h2</h1><h1 class="uk-h3 mt-4">h3</h1><h1 class="uk-h4 mt-4">h4</h1> -
Something's not working? Feel free to report an issue or edit this snippet .
<div><h1 className="uk-h1 mt-4">h1</h1><h1 className="uk-h2 mt-4">h2</h1><h1 className="uk-h3 mt-4">h3</h1><h1 className="uk-h4 mt-4">h4</h1></div>
Hero
Add one of the following classes to apply hero headings. These classes are typically used to add a prominent message with a very large font size.
Class | Description |
---|---|
.uk-hero-sm | Add this class to apply a small-sized heading. |
.uk-hero-md | Add this class to apply a medium-sized heading. |
.uk-hero-lg | Add this class to apply a large-sized heading. |
.uk-hero-xl | Add this class to apply a xlarge-sized heading. |
.uk-hero-2xl | Add this class to apply a 2xlarge-sized heading. |
.uk-hero-3xl | Add this class to apply a 3xlarge-sized heading. |
-
Small
Medium
Large
XL
2XL
3XL
-
Something's not working? Feel free to report an issue or edit this snippet .
<h1 class="uk-hero-sm mt-4">Small</h1><h1 class="uk-hero-md mt-4">Medium</h1><h1 class="uk-hero-lg mt-4">Large</h1><h1 class="uk-hero-xl mt-4">XL</h1><h1 class="uk-hero-2xl mt-4">2XL</h1><h1 class="uk-hero-3xl mt-4">3XL</h1> -
Something's not working? Feel free to report an issue or edit this snippet .
<div><h1 className="uk-hero-sm mt-4">Small</h1><h1 className="uk-hero-md mt-4">Medium</h1><h1 className="uk-hero-lg mt-4">Large</h1><h1 className="uk-hero-xl mt-4">XL</h1><h1 className="uk-hero-2xl mt-4">2XL</h1><h1 className="uk-hero-3xl mt-4">3XL</h1></div>
Heading Styles
Add one of the following classes to modify the size and style of headings.
Class | Description |
---|---|
.uk-heading-divider | Add this class to apply a divider to a heading. |
.uk-heading-line | Add this class to apply a vertically centered line to a heading. |
.uk-heading-bullet | Add this class to apply a bullet to a heading. |
-
Divider
Line
Line
Line
Bullet
-
Something's not working? Feel free to report an issue or edit this snippet .
<h1 class="uk-hero-sm uk-heading-divider">Divider</h1><h1 class="uk-hero-sm uk-heading-line mt-4"><span>Line</span></h1><h1 class="uk-hero-sm uk-heading-line uk-text-right mt-4"><span>Line</span></h1><h1 class="uk-hero-sm uk-heading-line mt-4 text-center"><span>Line</span></h1><h1 class="uk-hero-sm uk-heading-bullet mt-4">Bullet</h1> -
Something's not working? Feel free to report an issue or edit this snippet .
<div><h1 className="uk-hero-sm uk-heading-divider">Divider</h1><h1 className="uk-hero-sm uk-heading-line mt-4"><span>Line</span></h1><h1 className="uk-hero-sm uk-heading-line uk-text-right mt-4"><span>Line</span></h1><h1 className="uk-hero-sm uk-heading-line mt-4 text-center"><span>Line</span></h1><h1 className="uk-hero-sm uk-heading-bullet mt-4">Bullet</h1></div>
Paragraph
-
The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax.
-
Something's not working? Feel free to report an issue or edit this snippet .
<p class="uk-paragraph">The king, seeing how much happier his subjects were, realized the error of hisways and repealed the joke tax.</p> -
Something's not working? Feel free to report an issue or edit this snippet .
<p className="uk-paragraph">The king, seeing how much happier his subjects were, realized the error of hisways and repealed the joke tax.</p>
Blockquote
-
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
-
Something's not working? Feel free to report an issue or edit this snippet .
<blockquote class="uk-blockquote">"After all," he said, "everyone enjoys a good joke, so it's only fair thatthey should pay for the privilege."</blockquote> -
Something's not working? Feel free to report an issue or edit this snippet .
<blockquote className="uk-blockquote">"After all," he said, "everyone enjoys a good joke, so it's only fair thatthey should pay for the privilege."</blockquote>
Inline code
-
franken-ui
-
Something's not working? Feel free to report an issue or edit this snippet .
<code class="uk-codespan">franken-ui</code> -
Something's not working? Feel free to report an issue or edit this snippet .
<code className="uk-codespan">franken-ui</code>
Text
Franken UI offers various text utilities to style your text.
Class | Description |
---|---|
.uk-text-lead | Add this class to highlight text, for example in article subtitles. |
.uk-text-meta | |
.uk-text-sm | Add this class to apply a small font size. |
.uk-text-base | Add this class to apply the default the font size. |
.uk-text-truncate | Prevents text from wrapping into multiple lines, truncating it and displaying an ellipsis instead. |
.uk-text-break | Breaks strings, if their length exceeds the width of their container. |
Text background
To apply a gradient or background image to text, add the .uk-text-background
class to a <span>
element inside the text element. Styles that don’t define a background-image
, will apply the primary color.
<h1><span class="uk-text-background"></span></h1>
-
Franken UI
-
Something's not working? Feel free to report an issue or edit this snippet .
<h1 class="uk-hero-lg"><spanclass="uk-text-background"style="background-image: linear-gradient(90deg, #e4e405 0%, #f01ebb 100%)">Franken UI</span></h1> -
Something's not working? Feel free to report an issue or edit this snippet .
<h1 className="uk-hero-lg"><span className="uk-text-background" style={{backgroundImage: 'linear-gradient(90deg, #e4e405 0%, #f01ebb 100%)'}}>Franken UI</span></h1>
- On This Page
- Headings
- Hero
- Heading Styles
- Paragraph
- Blockquote
- Inline code
- Text