Skip to main content
Clever Ops

Hover Index Card

Editorial cards fronted by a giant mono index numeral that fills from outline to solid ink on hover or focus, a zero-movement hover language built on clip-path, solid by default on touch.

Preview & code

Loading Hover Index Card preview

Installation

pnpm dlx shadcn@latest add @cleverui/card-hover-index

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { CardHoverIndex } from '@/components/ui/card-hover-index'
Exampletsx
import { CardHoverIndex } from '@/components/ui/card-hover-index'

export default function CardHoverIndexDemo() {
  return (
    <div className="mx-auto max-w-5xl px-4 py-16 sm:px-6">
      <CardHoverIndex
        startIndex={1}
        columns={3}
        items={[
          {
            title: 'Measure before you move',
            body: 'Instrument the current path for a full sprint. No rewrite until p95 and error budget are on the wall.',
            href: '#measure',
          },
          {
            title: 'Ship the narrowest cut',
            body: 'One interface, one consumer, one rollback. Breadth waits until the first cut is boring in production.',
            href: '#ship',
          },
          {
            title: 'Name the failure mode',
            body: 'Every principle ends with who pages, what degrades first, and the fifteen-minute recovery script.',
            href: '#failure',
          },
        ]}
      />
    </div>
  )
}

API reference

CardHoverIndex accepts the following props.

PropTypeDefaultDescription
items*CardHoverIndexItem[]2–4 entries in an order that is real content, principles, chapters, steps
startIndexnumber1first index numeral; renders zero-padded two digits
columns2 | 33grid columns at lg; single column below sm

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface CardHoverIndexItem {
  title: string
  body: string
  href?: string
}

Frequently asked questions

How do I install the Hover Index Card component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/card-hover-index`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Hover Index Card require?

Hover Index Card uses motion on top of React and Tailwind CSS. You don't need to install it manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Hover Index Card to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services