Data display

Status

A stat tile: a large value with a title and a description under it, on a soft colored background, for dashboards ("Revenue R$ 12k, +8% this month"). tk:status.group lays several of them out in a row that wraps.

R$ 12.480

Revenue

+8% this month

Blade

A rounded tile with a light green background, "R$ 12.480" large in the middle, "Revenue" under it and "+8% this month" in muted text.

A row from data #

Three tiles in a row, each at least 10rem wide, wrapping on narrow screens. The Orders tile is a link with a cart icon and darkens on hover.

R$ 12.480

Revenue

342

Orders

3

Refunds

Blade

With a trend #

"-3%" under the value with a downward arrow, in green: with trend-inverse, falling is good.

34

-3%

Cancellations

Blade

With extra content #

The slot goes under the texts.

99.98%

Uptime

All systems normal

Blade

Colors and icons #

color tints the background and the value; icon sits before the texts.

R$ 12k

Revenue

+8% this month

1,204

Visitors

+3% this week

3

Refunds

-2 since yesterday

18

Pending

4.8

Rating

27

Tickets

Blade

Trend colors #

The trend color comes from its sign: a + is green, a - is red, and 0% has no color nor arrow.

R$ 12k

+8%

Revenue

18

-2%

Refunds

1,204

0%

Visitors

Blade

Sizes #

size sets the value size and the padding.

42

Size sm

42

Size md

42

Size lg

Blade

Prepend, append and actions #

prepend, append and actions add content before the value, after the texts and as actions.

Live

99%

Availability

Last 30 days
Blade

Group size #

size on the group is passed to every tile and also sets the gap.

128

Active users

12

New today

2

Churned

Blade

Customization #

Classes go to the texts block; container: reaches the tile and value: the large value.

342

Orders

Blade

Reference

tk:status.group
└── tk:status ...

tk:status

Prop Type Default Description
value string | int | slot null The large value.
title string | slot null The text under the value, translated.
description string | slot null Muted text under the title, translated.
trend string | int | float | slot null A change shown under the value (+8%), with an arrow and a color from its sign: up and green for + or a positive number, down and red for - or a negative one, no arrow and no color for 0 or text without a sign.
trendInverse bool false Swaps the colors, for a number that is better when it falls (cancellations, response time).
icon string | slot null An icon before the texts.
color string gray A color name for the background and the value (green, red, blue...).
href string null Makes the tile a link.
size string md xs, sm, md, lg, xl, 2xl or 3xl. Sets the value size and the padding. Inherited from the group.
prepend, append, actions slot null Content before the value, after the texts, and actions.

Slots

Slot Description
default Content under the texts.

Prefixes

Prefix Goes to
container: The tile (container:class="min-h-32").
value: The large value.
trend: The trend text.

tk:status.group

Prop Type Default Description
items array null The tiles, as arrays of tk:status props.
size string md Passed to every tile; also sets the gap.

Slots

Slot Description
default Tiles written by hand, after those from items.

Customization

Classes and attributes on tk:status go to the texts block; the tile itself and the value take prefixes (listed in the Reference above).

blade

Accessibility

The value and texts are read in order, as plain text; a tile with href is a link whose name is its whole text. The value is not a heading: put a heading above the group when the dashboard needs one.