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.
Nothing to show
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.
Nothing to show
With a trend #
"-3%" under the value with a downward arrow, in green: with trend-inverse, falling is good.
Nothing to show
With extra content #
The slot goes under the texts.
Nothing to show
Colors and icons #
color tints the background and the value; icon sits before the texts.
R$ 12k
Revenue
1,204
Visitors
3
Refunds
18
Pending
4.8
Rating
27
Tickets
Nothing to show
Trend colors #
The trend color comes from its sign: a + is green, a - is red, and 0% has no color nor arrow.
R$ 12k
Revenue
18
Refunds
1,204
Visitors
Nothing to show
Sizes #
size sets the value size and the padding.
42
Size sm
42
Size md
42
Size lg
Nothing to show
Prepend, append and actions #
prepend, append and actions add content before the value, after the texts and as actions.
99%
Availability
Last 30 daysNothing to show
Group size #
size on the group is passed to every tile and also sets the gap.
128
Active users
12
New today
2
Churned
Nothing to show
Customization #
Classes go to the texts block; container: reaches the tile and value: the large value.
342
Orders
Nothing to show
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).
Nothing to show
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.