Home / Function/ useCarousel() — ui Function Reference

useCarousel() — ui Function Reference

Architecture documentation for the useCarousel() function in carousel.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  d1c48f69_7db6_6a59_cbe8_5cc53174caed["useCarousel()"]
  5561f304_821d_8ffa_5ecc_71dcfb6cdd6c["carousel.tsx"]
  d1c48f69_7db6_6a59_cbe8_5cc53174caed -->|defined in| 5561f304_821d_8ffa_5ecc_71dcfb6cdd6c
  fed50f19_8771_988d_dce7_8c20624df510["CarouselContent()"]
  fed50f19_8771_988d_dce7_8c20624df510 -->|calls| d1c48f69_7db6_6a59_cbe8_5cc53174caed
  312d79b3_4122_dbdc_8a84_7af3b2633b2c["CarouselItem()"]
  312d79b3_4122_dbdc_8a84_7af3b2633b2c -->|calls| d1c48f69_7db6_6a59_cbe8_5cc53174caed
  6bb54c3d_8eea_1042_1b40_b7a2cf3466a0["CarouselPrevious()"]
  6bb54c3d_8eea_1042_1b40_b7a2cf3466a0 -->|calls| d1c48f69_7db6_6a59_cbe8_5cc53174caed
  2bd5ea1b_599a_16fe_f44c_10aeb3a53102["CarouselNext()"]
  2bd5ea1b_599a_16fe_f44c_10aeb3a53102 -->|calls| d1c48f69_7db6_6a59_cbe8_5cc53174caed
  style d1c48f69_7db6_6a59_cbe8_5cc53174caed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/ui/carousel.tsx lines 35–43

function useCarousel() {
  const context = React.useContext(CarouselContext)

  if (!context) {
    throw new Error("useCarousel must be used within a <Carousel />")
  }

  return context
}

Subdomains

Frequently Asked Questions

What does useCarousel() do?
useCarousel() is a function in the ui codebase, defined in deprecated/www/registry/new-york/ui/carousel.tsx.
Where is useCarousel() defined?
useCarousel() is defined in deprecated/www/registry/new-york/ui/carousel.tsx at line 35.
What calls useCarousel()?
useCarousel() is called by 4 function(s): CarouselContent, CarouselItem, CarouselNext, CarouselPrevious.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free