Skip to content
TallCraftUI

Stat

Metric card with title, value, description and icon.

Basic usage

Total users

10,500

Total users

10,500

12.5%

Total users

10,500

5%
Blade
<x-stat icon="users" title="Total users" number="10,500" />
<x-stat icon="users" title="Total users" number="10,500" tooltip increase="12.5%" />
<x-stat icon="users" title="Total users" number="10,500" tooltip="User decrease" decrease="5%" />

Icon right

Total users

10,500

Total users

10,500

Blade
<x-stat icon-right="users" title="Total users" number="10,500" class="w-56" />
<x-stat icon-right="users" title="Total users" number="10,500" tooltip increase class="w-64" />

Color variants

Available all tailwind css colors including primary and secondary color.

Total users

10,500

Total users

10,500

Total users

10,500

Blade
<x-stat icon-right="users" title="Total users" number="10,500" class="w-56" primary />
<x-stat icon-right="users" title="Total users" number="10,500" class="w-56" amber />
<x-stat icon-right="users" title="Total users" number="10,500" class="w-56" rose />

Customization

Total users

10,500

Blade
<x-stat icon="users" title="Total users" number="10,500" class="w-56 shadow-md shadow-gray-200" rounded-none />

API reference

Props are read from the component classes in TallCraftUI 3.0.0-beta.1. Write them in kebab-case and pass booleans as bare attributes, for example <x-button outline />. Other attributes, such as class or wire:model, are passed to the component's element.

<x-stat>

View source
Prop Type Default
title string null
icon string null
icon-right string null
number string|int|null null
tooltip string|bool false
increase string|bool false
decrease string|bool false
Colors
primary secondary black white slate gray zinc neutral stone red orange amber yellow lime green emerald teal cyan sky blue indigo violet purple fuchsia pink rose
Radius
rounded-none rounded-xs rounded-sm rounded-md rounded-lg rounded-xl rounded-2xl rounded-3xl rounded-full
Config
stat.border-radius = rounded-lg Change defaults