Stats Details
DetailedStats is a registry block that renders a three-column grid of stat cards (Revenue Growth, Customer Retention, Data Processed), each with a lucide icon, a large value, and a description. Cards reveal a hover image overlay and turn orange-accented on hover, and the block takes no props.
Installation
Usage
import { DetailedStats } from '@/components/stats-details'export default function Page() { return <DetailedStats />}- Showing a set of three headline KPIs or metrics on a landing page, pricing page, or about page where each stat needs a short explanation.
- Replacing a plain stats strip with a more editorial card layout that has icons, long-form descriptions, and a hover reveal.
- Starting point for a marketing or investor-facing metrics section that you will later swap to real data by editing the stats array in the source file.
Examples
Default usage on a page
Render the block directly. It has no props and uses its built-in stats array.
import { DetailedStats } from '@/components/stats-details'export default function MetricsPage() { return ( <main> <DetailedStats /> </main> )}Wrapping the block with a scroll-in animation
DetailedStats itself has no animation. TimelineAnimation (installed with the block) can wrap any element to fade and blur it in when it enters the viewport. This wraps a custom heading placed above the block.
import { useRef } from 'react'import { TimelineAnimation } from '@/components/ui/timeline-animation'import { DetailedStats } from '@/components/stats-details'export default function AnimatedMetricsPage() { const ref = useRef<HTMLDivElement>(null) return ( <div ref={ref}> <TimelineAnimation as='h2' animationNum={0} timelineRef={ref} className='text-center text-3xl font-semibold'> Our impact in numbers </TimelineAnimation> <DetailedStats /> </div> )}API reference
Accessibility
- The stat values and labels are real text in h3 and p elements inside an article, so screen readers read them in order. Prefer a heading level that fits the surrounding page outline, since the block uses h3 and the section has no heading of its own.
- The section has no accessible name. Wrap the block with a labelled region or add a visible heading above it so assistive technology users can find it.
- The lucide icons are decorative and have no aria-hidden attribute in the source. Add aria-hidden='true' to them when you adapt the block, because the label already conveys the meaning.
- The hover overlay <img> is a decorative photo but uses alt='supportive img'. Change it to alt='' and add aria-hidden='true' so screen readers skip it.
- The hover-only color and image changes are not available to keyboard or touch users because the cards are not focusable. Information is fully present without hover, so this is safe, but do not place interactive controls inside the cards without adding focus styles.
- Text contrast relies on hover colors: zinc-400 labels on zinc-50 and white-on-photo text on hover. Verify contrast ratios for both the default and hovered states against WCAG AA when you change the palette.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Stats Details" component (ui-layouts/stats-details) from its shadcn registry.1. Install it with: npx shadcn@latest add https://ui-layouts.com/r/stats-details.json2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: DetailedStats, TimelineAnimation.children, TimelineAnimation.animationNum, TimelineAnimation.timelineRef, TimelineAnimation.className, TimelineAnimation.as, TimelineAnimation.customVariants, TimelineAnimation.once.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { DetailedStats } from '@/components/stats-details'export default function Page() { return <DetailedStats />}```Files & dependencies
- ../../packages/blocks/src/stats-section/stats-details.tsx
- ./components/ui/timeline-animation.tsx
Looks similar, elsewhere
There is no screenshot of this item to compare yet.