Layout

Text

A paragraph of body text in the type scale and colors of the other components, for descriptions, hints and captions. It takes the element props, so it can carry an icon or a badge, and renders nothing when it has no content.

Invoices are issued on the first day of each month.

Blade

A <p> in the base size and the default text color (lighter in dark mode). The label is translated, and line breaks in it are kept.

Sizes, weights and colors #

Small muted text; bold, darker text; red text with an icon before it.

Last updated 5 minutes ago

Total: R$ 120,00

Payment failed.

Blade

Inside other markup #

as renders another element, here a <span> inside a line; the slot takes the place of label and is not translated.

Sizes #

size sets the font and icon size, from xs to 3xl.

The quick brown fox · xs

The quick brown fox · sm

The quick brown fox · md

The quick brown fox · lg

The quick brown fox · xl

The quick brown fox · 2xl

The quick brown fox · 3xl

Blade

Scale #

scale moves the font size one or two steps from size (smallest, small, large, largest).

Smallest

Small

Large

Largest

Blade

Accent and other colors #

The accent variant follows the theme accent; color takes any palette color and wins over variant.

Accent text

Payment received.

Blade

Icons, badges and info #

The element props work on text: icon, badge, suffix, and info for a help icon with a tooltip.

São Paulo, Brazil

Weekly report New

Storage used 4.2 GB of 10 GB

Billing email

Blade

Bound text #

The text follows Livewire state and keeps the line breaks of the label. Type in the textarea to update it.

Product designer in São Paulo.
Loves typography.

Blade

Rendering from data #

One line per payment, with a color picked from its status. as=span renders the amount inline.

Ana Souza · $ 120.00

Bruno Lima · $ 89.90

Carla Mendes · $ 45.00

Blade

Customization #

Classes go to the element; the parts take the prefixes of the element props (icon:, badge:...).

Draft

Blade

Reference

tk:text

Prop Type Default Description
label string | slot null The text, translated. The default slot takes its place.
size string md xs, sm, md, lg, xl, 2xl or 3xl. Sets the font and icon size.
scale string null smallest, small, large or largest: moves the font size one or two steps from size.
weight bool false Uses the heavier weight of the size.
variant string default strong (darker), subtle (muted), accent (the accent color), none (no color class), or the default body color.
color string null A color name (red, green...). Takes precedence over variant.
info string null A help icon at the end, with this text as its tooltip (info: reaches the icon).

Also accepts the element props (icon, badge, suffix...) and as for the element to render (p by default; href makes it a link).

Slots

Slot Description
default The text, in place of label.

Customization

Classes and attributes go to the element; the parts take the prefixes of the element props (icon:, badge:...).

blade

Accessibility

Plain text in a <p>; read in order. A paragraph that names something (a field, a section) should be linked to it with aria-describedby, as the field props do for their description and help.

Behavior notes

  • With no label, no slot content and no other part (icon, badge...), nothing is rendered.
  • A tk:text right after a tk:heading gets a small gap above it.