Stat

Stat components make data look fabulous. Use the family of stat components to display metrics, values, icons, and actions in a visually pleasing way.

Basic Usage

A basic stat block with title, value, and description, using the Stats, Stat, StatTitle, StatValue, and StatDesc components.

Total Page Views
89,400
10% more than last month
Code Example
Basic.vue

Stats

The Stats component is the parent element that groups stat blocks together.

Stats Slots Description
default

The default slot. Place Stat components as children.

Stat

The Stat component is the wrapper for a single stat. Use orientation props to control layout.

Stat Props Type Description
orientation
string

Sets the layout orientation. Options: - vertical (default) - horizontal

   
vertical
boolean

Shortcut for vertical orientation.

   
horizontal
boolean

Shortcut for horizontal orientation.

Stat Slots Description
default

The default slot. Place stat content and child components here.

StatTitle

The StatTitle component contains the title of the stat block.

StatTitle Slots Description
default

The default slot. Place title text here.

StatValue

The StatValue component holds the featured value of the stat block.

StatValue Slots Description
default

The default slot. Place the value here.

StatDesc

The StatDesc component holds the description of the stat block.

StatDesc Slots Description
default

The default slot. Place the description here.

StatFigure

The StatFigure component holds an icon or image for the stat block.

StatFigure Slots Description
default

The default slot. Place icon or image here.

StatActions

The StatActions component is the place to put buttons or other actions for the stat block.

StatActions Slots Description
default

The default slot. Place actions here.

Examples

With Icons

Stat blocks with icons and colored values, using the StatFigure component to display icons or avatars.

Total Likes
25.6K
21% more than last month
Page Views
2.6M
21% more than last month
86%
Tasks done
31 tasks remaining
Code Example
WithIcons.vue

With Actions

Stat blocks with buttons and actions, using the StatActions component for interactive controls.

Account balance
$89,400
Current balance
$89,400
Code Example
WithButton.vue

Another Example

An additional stat example demonstrating advanced or custom usage.

Downloads
31K
Jan 1st - Feb 1st
New Users
4,200
↗︎ 400 (22%)
New Registers
1,200
↘︎ 90 (14%)
Code Example
AnotherExample.vue