Learus / react-material-ui-carousel

A Generic carousel UI component for React using Material UI.
MIT License
550 stars 219 forks source link

Set current index #199

Open bpinela opened 2 years ago

bpinela commented 2 years ago

There is a way to set current index?

if its not could it be a great feat

ayushmanchhabra commented 1 year ago

https://github.com/Learus/react-material-ui-carousel/blob/3357104c8d5c7ce06ea9a33a08fe460a80f2d4ef/src/components/types.ts#L25

You can set current index using the index prop. For example:

<Carousal index={2}>

There are a bunch of pretty neat features described in the comments of the CarouselProps.