BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-zhcndoc/carousel
This component no longer exists. It was in shadcn-zhcndoc’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-14 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

carousel

shadcn-zhcndoc/carousel
RemovedComponent

shadcn-zhcndoc publishes no description for this item.

Live preview

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

Install it

npx shadcn@latest add https://shadcn.zhcndoc.com/r/styles/new-york/carousel.json

Source

ui/carousel.tsxshadcn.zhcndoc.com/r/styles/new-york/carousel.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import useEmblaCarousel, {
5 type UseEmblaCarouselType,
6} from "embla-carousel-react"
7import { ArrowLeft, ArrowRight } from "lucide-react"
8
9import { cn } from "@/lib/utils"
10import { Button } from "@/registry/new-york/ui/button"
11
12type CarouselApi = UseEmblaCarouselType[1]
13type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
14type CarouselOptions = UseCarouselParameters[0]
15type CarouselPlugin = UseCarouselParameters[1]
16
17type CarouselProps = {
18 opts?: CarouselOptions
19 plugins?: CarouselPlugin
20 orientation?: "horizontal" | "vertical"
21 setApi?: (api: CarouselApi) => void
22}
23
24type CarouselContextProps = {
25 carouselRef: ReturnType<typeof useEmblaCarousel>[0]
26 api: ReturnType<typeof useEmblaCarousel>[1]
27 scrollPrev: () => void
28 scrollNext: () => void
29 canScrollPrev: boolean
30 canScrollNext: boolean
31} & CarouselProps
32
33const CarouselContext = React.createContext<CarouselContextProps | null>(null)
34
35function useCarousel() {
36 const context = React.useContext(CarouselContext)
37
38 if (!context) {
39 throw new Error("useCarousel must be used within a <Carousel />")
40 }
41
42 return context
43}
44
45const Carousel = React.forwardRef<
46 HTMLDivElement,
47 React.HTMLAttributes<HTMLDivElement> & CarouselProps
48>(
49 (
50 {
51 orientation = "horizontal",
52 opts,
53 setApi,
54 plugins,
55 className,
56 children,
57 ...props
58 },
59 ref
60 ) => {
61 const [carouselRef, api] = useEmblaCarousel(
62 {
63 ...opts,
64 axis: orientation === "horizontal" ? "x" : "y",
65 },
66 plugins
67 )
68 const [canScrollPrev, setCanScrollPrev] = React.useState(false)
69 const [canScrollNext, setCanScrollNext] = React.useState(false)
70
71 const onSelect = React.useCallback((api: CarouselApi) => {
72 if (!api) {
73 return
74 }
75
76 setCanScrollPrev(api.canScrollPrev())
77 setCanScrollNext(api.canScrollNext())
78 }, [])
79
80 const scrollPrev = React.useCallback(() => {
81 api?.scrollPrev()
82 }, [api])
83
84 const scrollNext = React.useCallback(() => {
85 api?.scrollNext()
86 }, [api])
87
88 const handleKeyDown = React.useCallback(
89 (event: React.KeyboardEvent<HTMLDivElement>) => {
90 if (event.key === "ArrowLeft") {
91 event.preventDefault()
92 scrollPrev()
93 } else if (event.key === "ArrowRight") {
94 event.preventDefault()
95 scrollNext()
96 }
97 },
98 [scrollPrev, scrollNext]
99 )
100
101 React.useEffect(() => {
102// … truncated

What it pulls in

npm packages

  • embla-carousel-react

Other registry items

  • button

Files it writes

  • ui/carousel.tsx

Facts

Registry
shadcn-zhcndoc
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-08
Last confirmed
5 days ago

Go to the source

Docs on shadcn-zhcndoc shadcn.zhcndoc.com zhcndoc/shadcn on GitHub Raw registry item This item as JSON

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

ToolDrift

What the AI coding tools changed last night

tooldrift.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 ToolDrift

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 ToolDrift

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 ToolDrift

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