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 emitted as inline font-*/color declarations that read the
design tokens (var(--ink), var(--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 ink, and
success/warning/error/info/secondary the signal colours.
text defaults weight to nil (inherit); an explicit "normal" sets font-weight:400.
Summary
Functions
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).
Code inside running text: mono 12.5px on the fill colour, in the primary text colour.
A keyboard key (lu-kbd).
A run of text, a paragraph unless as says otherwise.
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.
Same as text/1 (same attributes and slots), under the name the design vitrine uses.
Functions
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).
Attributes
level(:integer) - Defaults tonil.Must be one ofnil,1,2,3,4,5, or6.size(:string) - Defaults tonil.Must be one ofnil,"2xl","3xl","base","lg","sm","title", or"xl".display(:integer) - Defaults tonil.Must be one ofnil,1,2,3,4, or5.weight(:string) - Defaults tonil.Must be one ofnil,"normal","light","medium","semibold", or"bold".color(:string) - Defaults to"default". Must be one of"default","error","faint","fg","info","ink","muted","neutral","primary","secondary","subtle","success", or"warning".class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
Code inside running text: mono 12.5px on the fill colour, in the primary text colour.
Attributes
class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
A keyboard key (lu-kbd).
Attributes
variant(:string) -flathas no shadow, on the sunken fill;darkis for dark surfaces (tooltip, toast). Defaults to"raised". Must be one of"raised","flat", or"dark".class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
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.
Attributes
as(:string) - Defaults to"p". Must be one of"p","span","div","strong","em", or"small".size(:string) - Defaults to"inherit". Must be one of"inherit","xs","xs-plus","sm","base","lg","xl","meta", or"lead".weight(:string) - Defaults tonil.Must be one ofnil,"normal","light","medium","semibold", or"bold".color(:string) - Defaults to"default". Must be one of"default","error","faint","fg","info","ink","muted","neutral","primary","secondary","subtle","success", or"warning".mono(:boolean) - Defaults tofalse.gradient(:string) - Defaults tonil.Must be one ofnil,"sky-blue","green-fuchsia","fuchsia-pink","amber-orange", or"purple-indigo".decoration(:string) - Defaults tonil.Must be one ofnil,"underline","overline","line-through", or"none".class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
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.
Attributes
decoration_color(:string) - Defaults to"current". Must be one of"current","primary","secondary","info","success","warning", or"error".decoration_style(:string) - Defaults to"solid". Must be one of"solid","wavy","double","dotted", or"dashed".class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["href", "navigate", "patch", "method", "download", "target", "rel", "replace"].
Slots
inner_block(required)
Same as text/1 (same attributes and slots), under the name the design vitrine uses.
Attributes
as(:string) - Defaults to"p". Must be one of"p","span","div","strong","em", or"small".size(:string) - Defaults to"inherit". Must be one of"inherit","xs","xs-plus","sm","base","lg","xl","meta", or"lead".weight(:string) - Defaults tonil.Must be one ofnil,"normal","light","medium","semibold", or"bold".color(:string) - Defaults to"default". Must be one of"default","error","faint","fg","info","ink","muted","neutral","primary","secondary","subtle","success", or"warning".mono(:boolean) - Defaults tofalse.gradient(:string) - Defaults tonil.Must be one ofnil,"sky-blue","green-fuchsia","fuchsia-pink","amber-orange", or"purple-indigo".decoration(:string) - Defaults tonil.Must be one ofnil,"underline","overline","line-through", or"none".class(:any) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)