BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/interlace-ui/focus-cards

Focus Cards

interlace-ui/focus-cards
FreeComponent

A grid that spotlights one card at a time: pointing at or keyboard-focusing a card keeps it sharp while every sibling dims and blurs. Real list semantics — `ul` › `li` › `article` — and a controlled or uncontrolled active index.

Install it

npx shadcn@latest add https://ds.interlace.tools/r/focus-cards.json

Source

registry/interlace-ui/aceternity/focus-cards.tsxds.interlace.tools/r/focus-cards.json · first 6 KB
1"use client";
2
3import {
4 type ComponentPropsWithoutRef,
5 type ReactNode,
6 useCallback,
7 useState,
8} from "react";
9
10// @interlace/focus-cards v1.2.0 — Interlace design system.
11// Docs, props and live preview: https://ds.interlace.tools/c/focus-cards
12// What changed since: https://ds.interlace.tools/c/focus-cards#history
13// Generated banner — keep it, the upgrade diff reads this version.
14
15/**
16 * @interlace/ui — FocusCards + FocusCard
17 *
18 * A grid that spotlights one card at a time: pointing at or keyboard-focusing
19 * a card keeps it sharp while every sibling dims and blurs. Real list
20 * semantics — `ul` › `li` › `article` — and a controlled or uncontrolled
21 * active index.
22 *
23 * The media is whatever node you pass: image, `next/image`, video, canvas.
24 * Nothing here assumes an `<img>`.
25 *
26 * ## Provenance
27 *
28 * Our reimplementation of the Aceternity UI "Focus Cards" pattern. What is
29 * ours: focus, not just hover, drives the active state (so the grid works from
30 * the keyboard); the active index is controllable and reports why it changed;
31 * the card is a `renderItem` + `caption` composition rather than a fixed
32 * `{src, title}` shape; and all colour comes from tokens.
33 *
34 * ## Anatomy
35 *
36 * FocusCards (ul — data-slot="focus-cards")
37 * └─ li (data-slot="focus-cards-item",
38 * group/focus-item, data-active/data-dimmed,
39 * owns the pointer + focus handlers)
40 * └─ FocusCard (article — data-slot="focus-card")
41 * ├─ div (data-slot="focus-card-media")
42 * └─ div (data-slot="focus-card-caption")
43 *
44 * The active/dim state travels down as `group-data-[active]/focus-item` and
45 * `group-data-[dimmed]/focus-item` CSS, so `renderItem` never forwards a prop
46 * for it. `FocusCard`'s own `active` / `dimmed` props exist only for composing
47 * a card outside the grid.
48 *
49 * ## Motion
50 *
51 * Tailwind transitions, JS-gated. `FocusCard` calls `useReducedMotion()` and
52 * omits three class groups when it returns true: the
53 * `transition-[filter,transform,opacity] duration-300` on the card, the
54 * `scale-[0.98] blur-sm` / `scale-100 blur-none` pair, and the caption's
55 * `transition-opacity`. What survives under `prefers-reduced-motion: reduce`
56 * is the part that carries the meaning — `opacity-60` on the receding cards
57// … truncated

Facts

Registry
interlace-ui
Type
registry:ui
Access
Free
Files written
0
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

ds.interlace.tools Raw registry item This item as JSON

More from interlace-ui

All 140 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
A11y Startera11y-starterinterlace-uiComponentsFreeno deps
Accordionaccordioninterlace-uiComponentsFreeno deps
Alertalertinterlace-uiComponentsFreeno deps
Alert Dialogalert-dialoginterlace-uiComponentsFreeno deps
Animated Gradient Textanimated-gradient-textinterlace-uiComponentsFreeno deps
Animated Grid Patternanimated-grid-patterninterlace-uiComponentsFreeno deps
Animated Listanimated-listinterlace-uiComponentsFreeno deps
Article Cardarticle-cardinterlace-uiComponentsFreeno deps

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex