BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fancy/css-box-non-uniform-demo

Css Box Non Uniform Demo

fancy/css-box-non-uniform-demo
FreeBlock

A block component.

Install it

npx shadcn@latest add https://www.fancycomponents.dev/r/css-box-non-uniform-demo.json

Source

examples/blocks/css-box-non-uniform-demo.tsxwww.fancycomponents.dev/r/css-box-non-uniform-demo.json
1import { useEffect, useRef } from "react"
2
3import { cn } from "@/lib/utils"
4import CSSBox, { CSSBoxRef } from "@/components/fancy/blocks/css-box"
5
6const BoxText = ({ className }: { className?: string }) => (
7 <div
8 className={cn(
9 "w-full h-full text-white flex items-center justify-center p-2 text-sm font-bold bg-transparent",
10 className
11 )}
12 >
13 ANYTHING IS POSSIBLE
14 </div>
15)
16
17export default function CSSBox2Demo() {
18 const boxRefs = useRef<(CSSBoxRef | null)[]>([])
19
20 useEffect(() => {
21 const animate = async () => {
22 const delay = (ms: number) =>
23 new Promise((resolve) => setTimeout(resolve, ms))
24
25 while (true) {
26 // Rotate to right face
27 for (let i = 0; i < boxRefs.current.length; i++) {
28 boxRefs.current[i]?.showRight()
29 await delay(50)
30 }
31 await delay(1000)
32
33 // Rotate to back face
34 for (let i = 0; i < boxRefs.current.length; i++) {
35 boxRefs.current[i]?.showBack()
36 await delay(50)
37 }
38 await delay(1000)
39
40 // Rotate to left face
41 for (let i = 0; i < boxRefs.current.length; i++) {
42 boxRefs.current[i]?.showLeft()
43 await delay(50)
44 }
45 await delay(1000)
46
47 // Rotate to front face
48 for (let i = 0; i < boxRefs.current.length; i++) {
49 boxRefs.current[i]?.showFront()
50 await delay(50)
51 }
52 await delay(1000)
53 }
54 }
55
56 animate()
57 }, [])
58
59 return (
60 <div className="flex flex-col items-center justify-center w-dvw h-dvh bg-black">
61 <div>
62 {[...Array(12)].map((_, index) => (
63 <CSSBox
64 key={index}
65 ref={(el) => {
66 if (el) boxRefs.current[index] = el
67 }}
68 width={200}
69 height={30}
70 depth={200}
71 draggable={false}
72 className="hover:z-10"
73 faces={{
74 front: <BoxText className=" border-white " />,
75 back: <BoxText className=" border-white" />,
76 left: <BoxText className=" border-white bg-white text-black" />,
77 right: <BoxText className=" border-white bg-white text-black" />,
78 }}
79 />
80 ))}
81 </div>
82 </div>
83 )
84}

What it pulls in

Other registry items

  • fancy/blocks/css-box

Files it writes

  • examples/blocks/css-box-non-uniform-demo

Facts

Registry
fancy
Type
registry:block
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

www.fancycomponents.dev danielpetho/fancy on GitHub Raw registry item This item as JSON

More from fancy

All 158 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Gradient Demoanimated-gradient-demofancyBlocksFreeno deps
Basic Number Ticker Demobasic-number-ticker-demofancyBlocksFreeno deps
Box Carousel Autoplay Demobox-carousel-autoplay-demofancyBlocksFree1 dep
Box Carousel Demobox-carousel-demofancyBlocksFree1 dep
Box Carousel Video Demobox-carousel-video-demofancyBlocksFree1 dep
Breathing Text Demobreathing-text-demofancyBlocksFreeno deps
Circling Elements Democircling-elements-demofancyBlocksFreeno deps
Circling Elements Easing Democircling-elements-easing-demofancyBlocksFreeno deps
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex