Carousel
This is a pass through component from React-Bootstrap.
See React-Bootstrap for documentation.
Basic Usage
Any Paragon component or export may be added to the code example.
Theme Variables#
CSS Variable | Computed Value |
---|---|
| |
| |
| |
| |
| |
Props API#
- as
elementType
Default'div'Specifies element type for this component.
- activeIndex
number
Controls the current visible slide. Defaults to
defaultActiveIndex
prop - defaultActiveIndex
number
Default0Specifies default active index prop
- controls
bool
DefaulttrueShow the
Carousel's
previous and next arrows for changing the current slide. - fade
bool
DefaultfalseAnimates slides with a crossfade animation instead of the default slide animation.
- indicators
bool
DefaulttrueShow a set of slide position indicators.
- interval
number
Default5000The amount of time to delay between automatically cycling an item.
- keyboard
bool
DefaulttrueSpecifies whether the
Carousel
should react to keyboard events. - nextIcon
node
Default<span aria-hidden="true" className="carousel-control-next-icon" />Override the default button icon for the "next" control
- nextLabel
string
Default'Next'Label shown to screen readers only, can be used to show the next element in the
Carousel
- onSelect
func
Callback fired when the active item changes.
- onSlid
func
Callback fired when a slide transition ends.
- onSlide
func
Callback fired when a slide transition starts.
- pause
enum
'hover' | falseDefault'hover'If set to "hover", pauses the cycling of the
Carousel
on mouseenter and resumes the cycling of the carousel on mouseleave. If set to false, hovering over theCarousel
won't pause it.On touch-enabled devices, when set to "hover", cycling will pause on touchend (once the user finished interacting with the
Carousel
) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior. - prevIcon
node
Default<span aria-hidden="true" className="carousel-control-prev-icon" />Override the default button icon for the "previous" control
- prevLabel
string
Default'Previous'Label shown to screen readers only, can be used to show the previous element in the
Carousel
. Set to null to deactivate. - slide
bool
DefaulttrueEnables animation on the Carousel as it transitions between slides.
- touch
bool
DefaulttrueWhether the
Carousel
should support left/right swipe interactions on touchscreen devices. - wrap
bool
DefaulttrueWhether the
Carousel
should cycle continuously or have hard stops - bsPrefix
string
Default'carousel'Overrides underlying component base CSS class name
- as
elementType
Default'div'Specifies element type for this component.
- interval
number
The amount of time to delay between automatically cycling this specific item. Will default to the
Carousel's
interval prop value if none is specified. - bsPrefix
string
Default'carousel-item'Overrides underlying component base CSS class name
- as
elementType
Default'div'Specifies element type for this component.
- bsPrefix
string
Default'carousel-caption'Overrides underlying component base CSS class name