MCPcopy Index your code
hub / github.com/Emiliano-Bucci/react-spring-carousel

github.com/Emiliano-Bucci/react-spring-carousel @v2.0.19

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.19 ↗ · + Follow
101 symbols 303 edges 34 files 0 documented · 0% updated 2mo agov2.0.13 · 2022-04-16★ 749 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

react-spring-carousel

A performant React carousel component powered by react-spring and @use-gesture.

NPM NPM

Install

// npm v7.x
npm install --save react-spring-carousel
// npm v6.x or less
npm install --save react-spring react-spring-carousel
yarn add react-spring react-spring-carousel

Usage

import { useSpringCarousel } from 'react-spring-carousel'

const { carouselFragment, slideToPrevItem, slideToNextItem } = useSpringCarousel({
  items: [
    {
      id: 'item-1',
      renderItem: 

Item 1

,
    },
    {
      id: 'item-2',
      renderItem: 

Item 2

,
    },
  ],
})

return (



    <button onClick={slideToPrevItem}>Prev item</button>


{carouselFragment}


    <button onClick={slideToNextItem}>Next item</button>



)

Official documentation

For a complete overview of the library, please visit the official documentation.

Visit here

Core symbols most depended-on inside this repo

getSlideValue
called by 22
src/useSpringCarousel/index.tsx
getCurrentActiveItem
called by 18
src/useSpringCarousel/index.tsx
emitObservable
called by 16
src/modules/useCustomEventsModule.tsx
slideToItem
called by 16
src/useSpringCarousel/index.tsx
getCurrentSlidedValue
called by 13
src/useSpringCarousel/index.tsx
getSlideActionType
called by 13
src/useSpringCarousel/index.tsx
setActiveItem
called by 10
src/useSpringCarousel/index.tsx
getSlideActionType
called by 9
src/useTransitionCarousel/index.tsx

Shape

Function 101

Languages

TypeScript100%

Modules by API surface

src/useSpringCarousel/index.tsx55 symbols
src/modules/useThumbsModule.tsx15 symbols
src/useTransitionCarousel/index.tsx13 symbols
src/modules/useFullscreenModule.tsx6 symbols
src/modules/useCustomEventsModule.tsx3 symbols
scripts/release.js2 symbols
src/utils.ts1 symbols
examples/useTransitionCarousel/Development/Development.tsx1 symbols
examples/useTransitionCarousel/Development/Development.stories.tsx1 symbols
examples/useSpringCarousel/Development/Development.tsx1 symbols
examples/useSpringCarousel/Development/Development.stories.tsx1 symbols
Examples/components/SliderWrapper/SliderWrapper.tsx1 symbols

For agents

$ claude mcp add react-spring-carousel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page