Typography
level 1–6 · display 1–5 · size · weight · color (13) · as
Escala tipográfica: Inter com tracking negativo nos números grandes e Geist Mono para código, IDs e contadores.
Texto sendo escrito
<.text as="div" weight="semibold" class="text-[30px] tracking-[-.03em]"><span class="inline-block max-w-0 animate-[lu-typeloop_6s_steps(28)_infinite] overflow-hidden align-bottom whitespace-nowrap">Gestão simples para o varejo</span></.text>
level 1–6 · weight · color
h1 · Título nível 1
h2 · Título nível 2
h3 · Título nível 3
h4 · Título nível 4
h5 · Título nível 5
h6 · Título nível 6
<div class="flex flex-col gap-2"><.heading level={1}>h1 · Título nível 1</.heading><.heading level={2}>h2 · Título nível 2</.heading><.heading level={3}>h3 · Título nível 3</.heading><.heading level={4}>h4 · Título nível 4</.heading><.heading level={5}>h5 · Título nível 5</.heading><.heading level={6}>h6 · Título nível 6</.heading><div class="flex flex-wrap items-center gap-2.5"><.text as="span" weight="light">light</.text><.text as="span" weight="normal">normal</.text><.text as="span" weight="medium">medium</.text><.text as="span" weight="semibold">semibold</.text><.text as="span" weight="bold">bold</.text></div><div class="flex flex-wrap items-center gap-2.5"><.text as="span" color="ink">ink</.text><.text as="span" color="muted">muted</.text><.text as="span" color="subtle">subtle</.text><.text as="span" color="primary">primary</.text><.text as="span" color="success">success</.text><.text as="span" color="warning">warning</.text><.text as="span" color="error">error</.text><.text as="span" color="info">info</.text></div></div>
title · 18/26 · 600
<.text as="div" size="lg" weight="semibold" class="leading-[26px]">Revenue by plan</.text>
body · 15/22
<.text as="div" class="text-[15px] leading-[22px]">Ask why revenue moved and get the accounts behind it.</.text>
small · 13/18
<.text as="div" size="xs-plus" color="muted" class="leading-[18px]">vs $169,460 in Sep · 23 accounts</.text>
overline · 12 · .08em
Net revenue retention
<.card_heading level={3}>Net revenue retention</.card_heading>
code · Geist Mono 13
<.text as="span" mono class="text-[13px]">MRN-0204013 · <.kpi_card /></.text>
label · 13 · 500
<.label>Nome do workspace</.label>
Valores da API que completam a paridade
as p
as=p<div class="flex flex-col gap-4"><div class="grid grid-cols-10 gap-3.5"><div class="flex flex-col items-start gap-1.5"><.text as="span" size="xs">Signetum</.text><span class="font-mono text-[11px] text-muted">size=xs</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="xs-plus">Signetum</.text><span class="font-mono text-[11px] text-muted">size=xs-plus</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="sm">Signetum</.text><span class="font-mono text-[11px] text-muted">size=sm</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="base">Signetum</.text><span class="font-mono text-[11px] text-muted">size=base</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="lead">Signetum</.text><span class="font-mono text-[11px] text-muted">size=lead</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="lg">Signetum</.text><span class="font-mono text-[11px] text-muted">size=lg</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="xl">Signetum</.text><span class="font-mono text-[11px] text-muted">size=xl</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" class="text-[24px]">Signetum</.text><span class="font-mono text-[11px] text-muted">size=2xl</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" class="text-[30px]">Signetum</.text><span class="font-mono text-[11px] text-muted">size=3xl</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" size="inherit" class="text-[15px]">Signetum</.text><span class="font-mono text-[11px] text-muted">size=inherit</span></div></div><div class="grid grid-cols-7 gap-3.5"><div class="flex flex-col items-start gap-1.5"><.text as="span" color="ink">Texto</.text><span class="font-mono text-[11px] text-muted">color=default</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" color="fg">Texto</.text><span class="font-mono text-[11px] text-muted">color=fg</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" color="neutral">Texto</.text><span class="font-mono text-[11px] text-muted">color=neutral</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" color="faint">Texto</.text><span class="font-mono text-[11px] text-muted">color=faint</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" color="secondary">Texto</.text><span class="font-mono text-[11px] text-muted">color=secondary</span></div><div class="flex flex-col items-start gap-1.5"><.text class="my-3.5">as p</.text><span class="font-mono text-[11px] text-muted">as=p</span></div><div class="flex flex-col items-start gap-1.5"><.text as="strong">as strong</.text><span class="font-mono text-[11px] text-muted">as=strong</span></div></div><div class="grid grid-cols-5 gap-3.5"><div class="flex flex-col items-start gap-1.5"><.text as="span" gradient="amber-orange" class="text-[22px]">Signetum</.text><span class="font-mono text-[11px] text-muted">gradient=amber-orange</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" gradient="fuchsia-pink" class="text-[22px]">Signetum</.text><span class="font-mono text-[11px] text-muted">gradient=fuchsia-pink</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" gradient="green-fuchsia" class="text-[22px]">Signetum</.text><span class="font-mono text-[11px] text-muted">gradient=green-fuchsia</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" gradient="purple-indigo" class="text-[22px]">Signetum</.text><span class="font-mono text-[11px] text-muted">gradient=purple-indigo</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" gradient="sky-blue" class="text-[22px]">Signetum</.text><span class="font-mono text-[11px] text-muted">gradient=sky-blue</span></div></div><div class="grid grid-cols-9 gap-3.5"><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline">Texto</.text><span class="font-mono text-[11px] text-muted">decoration=underline</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="line-through">Texto</.text><span class="font-mono text-[11px] text-muted">decoration=line-through</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-solid">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_style=solid</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-dashed">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_style=dashed</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-dotted">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_style=dotted</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-double">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_style=double</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-wavy">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_style=wavy</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-current">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_color=current</span></div><div class="flex flex-col items-start gap-1.5"><.text as="span" decoration="underline" class="decoration-violet">Texto</.text><span class="font-mono text-[11px] text-muted">decoration_color=secondary</span></div></div></div>
Uso
<h1 class="display">Welcome back, Ikram</h1> <span class="metric-xl num">$184,320</span>
Regras
- Números de KPI usam
font-variant-numeric: tabular-numspara não dançar quando mudam. - Títulos de card são
overline: 12px, caixa-alta, tracking .08em, corink-2. - Prefixos e sufixos de unidade ($, %) ficam menores e em
subtle, alinhados ao topo.
Referência da API
Todos os function components, atributos, valores e slots que este componente cobre.
Ledger UI's type scale: headings, running text, text links, inline code and keyboard keys.
<.heading level={1}>Heading H1</.heading>
<.heading level={1} size="title">Financeiro</.heading>
<.heading display={2}>Display 2</.heading>
<.text size="lg" color="subtle">Contas a pagar e a receber.</.text>
<.text as="span" mono color="ink">R$ 3.120,50</.text>
<.text as="span" size="lg" weight="semibold" gradient="sky-blue">Gradient</.text>
<.text_link href="#" decoration_color="info" decoration_style="wavy">Tattooine</.text_link>
Press <.kbd>Ctrl</.kbd> + <.kbd>K</.kbd>, or run <.inline_code>mix test</.inline_code>.
Sizes, weights and colours are Tailwind utilities that read the design tokens (text-ink,
text-muted...), so they follow the theme. Every attr left at nil emits nothing and the text
inherits.
Colours: default inherits, ink/fg are the primary text, neutral is ink-2, muted,
subtle/faint the secondary and meta greys, primary the accent text, and
success/warning/error/info/secondary the signal colours.
text defaults weight to nil (inherit); an explicit "normal" sets font-weight:400.
A gradient paints the glyphs with the named gradient (bold unless weight says otherwise) and
makes color moot. style and class are for layout and one-off tweaks (a style always wins).
<.heading>
A heading, <h1> to <h6>. display renders the display headings (an <h1> unless level
says otherwise); size sets the type size apart from the level; size="title" is the page
title (34/40, semibold, ink).
| Attr | Type | Default | Values / notes |
|---|---|---|---|
level |
:integer |
nil |
nil, 1, 2, 3, 4, 5, 6 |
size |
:string |
nil |
nil, 2xl, 3xl, base, lg, sm, title, xl |
display |
:integer |
nil |
nil, 1, 2, 3, 4, 5 |
weight |
:string |
nil |
nil, normal, light, medium, semibold, bold |
color |
:string |
"default" |
default, error, faint, fg, info, ink, muted, neutral, primary, secondary, subtle, success, warning |
class |
:any |
nil |
|
style |
:string |
nil |
Any other HTML/phx attribute goes to the root element.
Slots:
<:inner_block>(required)
<.text>
A run of text, a paragraph unless as says otherwise.
meta is the 12.5px meta/help line, lead the line under a page title.
| Attr | Type | Default | Values / notes |
|---|---|---|---|
as |
:string |
"p" |
p, span, div, strong, em, small |
size |
:string |
"inherit" |
inherit, xs, xs-plus, sm, base, lg, xl, meta, lead |
weight |
:string |
nil |
nil, normal, light, medium, semibold, bold |
color |
:string |
"default" |
default, error, faint, fg, info, ink, muted, neutral, primary, secondary, subtle, success, warning |
mono |
:boolean |
false |
|
gradient |
:string |
nil |
nil, sky-blue, green-fuchsia, fuchsia-pink, amber-orange, purple-indigo |
decoration |
:string |
nil |
nil, underline, overline, line-through, none |
class |
:any |
nil |
|
style |
:string |
nil |
Any other HTML/phx attribute goes to the root element.
Slots:
<:inner_block>(required)
<.text_link>
A link inside running text, underlined (1px) in a theme colour and style. It keeps the weight
of the text around it. With href, navigate or patch.
| Attr | Type | Default | Values / notes |
|---|---|---|---|
decoration_color |
:string |
"current" |
current, primary, secondary, info, success, warning, error |
decoration_style |
:string |
"solid" |
solid, wavy, double, dotted, dashed |
class |
:any |
nil |
|
style |
:string |
nil |
Any other HTML/phx attribute goes to the root element, including href, navigate, patch, method, download, target, rel, replace.
Slots:
<:inner_block>(required)
<.inline_code>
Code inside running text: mono 12.5px on the fill colour, in the primary text colour.
| Attr | Type | Default | Values / notes |
|---|---|---|---|
class |
:any |
nil |
|
style |
:string |
nil |
Any other HTML/phx attribute goes to the root element.
Slots:
<:inner_block>(required)
<.kbd>
A keyboard key.
| Attr | Type | Default | Values / notes |
|---|---|---|---|
variant |
:string |
"raised" |
raised, flat, dark - flat has no shadow, on the sunken fill; dark is for dark surfaces (tooltip, toast). |
class |
:any |
nil |
|
style |
:string |
nil |
Any other HTML/phx attribute goes to the root element.
Slots:
<:inner_block>(required)
<.typography>
Same as text/1 (same attributes and slots), under the name the design vitrine uses.
| Attr | Type | Default | Values / notes |
|---|---|---|---|
as |
:string |
"p" |
p, span, div, strong, em, small |
size |
:string |
"inherit" |
inherit, xs, xs-plus, sm, base, lg, xl, meta, lead |
weight |
:string |
nil |
nil, normal, light, medium, semibold, bold |
color |
:string |
"default" |
default, error, faint, fg, info, ink, muted, neutral, primary, secondary, subtle, success, warning |
mono |
:boolean |
false |
|
gradient |
:string |
nil |
nil, sky-blue, green-fuchsia, fuchsia-pink, amber-orange, purple-indigo |
decoration |
:string |
nil |
nil, underline, overline, line-through, none |
class |
:any |
nil |
|
style |
:string |
nil |
Any other HTML/phx attribute goes to the root element.
Slots:
<:inner_block>(required)