BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/loomui/flip-card

Flip Card

loomui/flip-card
FreeComponent

A card with two faces that turns in 3D when it is clicked, controlled or on its own.

Live preview

live · rendered by the registry
Rendered by loomui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://loomui.design/r/flip-card.json

Source

registry/loomui/flip-card.tsxloomui.design/r/flip-card.json
1"use client"
2
3import * as React from "react"
4
5import { cn } from "@/lib/utils"
6
7export interface FlipCardProps extends Omit<
8 React.ComponentProps<"button">,
9 "content"
10> {
11 /** Face shown at rest. It sets the card's size; the back is laid over it. */
12 front: React.ReactNode
13 /** Face shown once the card is turned. */
14 back: React.ReactNode
15 /** Turn the card yourself. Leave it out to let the card own its state. */
16 flipped?: boolean
17 /** Starting face when the card owns its state. */
18 defaultFlipped?: boolean
19 /** Called with the face the card is turning to. */
20 onFlippedChange?: (flipped: boolean) => void
21 /** Turn around the vertical axis (`y`) or the horizontal one (`x`). */
22 axis?: "x" | "y"
23 /** Length of the turn in milliseconds. */
24 duration?: number
25 /** How much perspective the turn is drawn with, in pixels. Lower is deeper. */
26 depth?: number
27}
28
29const FACE = "absolute inset-0 [backface-visibility:hidden]"
30
31export function FlipCard({
32 front,
33 back,
34 flipped,
35 defaultFlipped = false,
36 onFlippedChange,
37 axis = "y",
38 duration = 480,
39 depth = 900,
40 className,
41 disabled,
42 onClick,
43 style,
44 ...props
45}: FlipCardProps) {
46 const [ownFlipped, setOwnFlipped] = React.useState(defaultFlipped)
47 const isControlled = flipped !== undefined
48 const isFlipped = isControlled ? flipped : ownFlipped
49
50 const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
51 onClick?.(event)
52
53 if (event.defaultPrevented || disabled) {
54 return
55 }
56
57 const next = !isFlipped
58 if (!isControlled) {
59 setOwnFlipped(next)
60 }
61 onFlippedChange?.(next)
62 }
63
64 const turn = axis === "x" ? "rotateX" : "rotateY"
65
66 return (
67 // A real button, so the card is reachable by keyboard and announces its
68 // state. `aria-pressed` is the honest mapping: this is a toggle, not a
69 // link to somewhere else.
70 <button
71 type="button"
72 data-slot="flip-card"
73 data-flipped={isFlipped ? "" : undefined}
74 aria-pressed={isFlipped}
75 disabled={disabled}
76 onClick={handleClick}
77 className={cn(
78 "group relative block text-left",
79 !disabled && "cursor-pointer",
80 className
81 )}
82 style={{ perspective: `${depth}px`, ...style }}
83 {...props}
84 >
85 <span
86 className="relative block h-full w-full transition-transform ease-[var(--ease-back-out)] [transform-style:preserve-3d] motion-reduce:transition-none"
87 style={{
88// … truncated

What it pulls in

Other registry items

  • utils

Files it writes

  • registry/loomui/flip-card.tsx

Facts

Registry
loomui
Type
registry:ui
Access
Free
Files written
1
Theme wiring
ships cssVars
Licence
MIT
In the index
at or before 2026-08-20
Last confirmed
yesterday

Go to the source

Docs on loomui loomui.design rjcuff/Loom-UI on GitHub Raw registry item This item as JSON

More from loomui

All 91 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Aurora Backdropaurora-backdroploomuiComponentsFreeno deps
Bento Gridbento-gridloomuiComponentsFreeno deps
Card Stackcard-stackloomuiComponentsFreeno deps
Compare Slidercompare-sliderloomuiComponentsFreeno deps
Confetti Buttonconfetti-buttonloomuiComponentsFreeno deps
Count Upcount-uploomuiComponentsFreeno deps
Credit Cardcredit-cardloomuiComponentsFreeno deps
DrawerdrawerloomuiComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.kynth.studio

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 SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

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 SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

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 SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

BlockDex