Here are some examples showcasing stats.
Stats have a transparent background by default. Use bg-base-100
if you
need a background color.
Stats are used to display simple data points. They can be used to display a number (the main content), a title, and a description.
Average Cart Value
You're doing quite well on your ACV!
Average Cart Value
You're doing quite well on your ACV!
.bg-base-100.lg:grid.lg:grid-flow-col.lg:auto-cols-auto.items-center.gap-x-4.border.rounded-lg{ class: "w-[300px] lg:w-[800px]" }
= daisy_stat do
= number_to_currency(8619.45)
= daisy_stat(title: "Views", description: "Views in the last 24 hours.") do
= number_with_delimiter(1208)
- # Example passing options as blocks. This allows you to pass in HTML.
= daisy_stat do |stat|
- stat.with_title do
%p.stat-title Average Cart Value
= number_to_currency(319, precision: 0)
- stat.with_description do
%p.stat-desc You're doing quite well on your ACV!
Stats can also be used to display more complex data points. You can pass in an image, an icon, or any other content you'd like.
New Students
New students in July!
New Students
New students in July!
.bg-base-100.lg:grid.lg:grid-flow-col.lg:auto-cols-auto.items-center.gap-x-4.border.rounded-lg{ class: "w-[300px] lg:w-[900px]" }
= daisy_stat(css: "max-w-80", title: "Tasks", description: "Completed this month.", src: image_path("avatars/lady-smiling-1.jpg")) do
25
= daisy_stat(css: "max-w-80", title: "Students", description: "Total enrollments.", icon: "academic-cap") do
= number_with_delimiter(1112)
= daisy_stat(css: "max-w-80") do |stat|
- stat.with_title do
%p.stat-title New Students
42
- stat.with_description do
%p.stat-desc New students in July!
- stat.with_figure do
= daisy_badge(css: "badge-primary") do
New!
Create virtual credit / debit cards to keep your real info safe.
Get $5 when you sign up — free to start!
Everything you need to grow your business with confidence!
CRM, Lead Generation, Project Management, Contracts, Online Payments, and more!
The ads above are affiliate links to products I regularly use and highly
recommend.
I may receive a commission if you decide to purchase.