Package reahl.web.bootstrap.carousel¶
New in version 3.2.
Carousel presents a slideshow of Widgets with captions on each slide.
Carousel¶
- class reahl.web.bootstrap.carousel.Carousel(view, css_id, show_indicators=True, interval=5000, pause='hover', wrap=True, keyboard=True, min_height=None)¶
A Widget that appears as having multiple panels of content of which only one panel is visible at a time. The visible panel is exchanged for another panel of content when prompted or automatically, at regular intervals, by visually sliding the new panel into position thus creating a slideshow effect.
- Parameters:
view – (See
Widget
)css_id – (See
HTMLElement
)show_indicators – If True (the default), includes indicators showing the number of slides and which one is visible.
interval – The number (an int) of milliseconds to delay between cycling content. If not given (the default), the Carousel will not cycle automatically.
pause – If set to ‘false’, hovering over the carousel will not pause it. Another option, ‘hover’ is supported.
wrap – If True, the Carousel cycles contiuously, else it stops at the last slide.
keyboard – If True, the Carousel reacts to keyboard events.
min_height – If given, force slides to be at least this high (useful to prevent resizing of the Carousel between slides that are unequal in height). The value is an int denoting a height in terms of the size of the font of the contents (em).
- add_slide(widget, caption_widget=None)¶
Adds a Slide for the given
Widget
.- Parameters:
widget – A
Widget
to display in this slide. (See alsoPlaceholderImage
)caption_widget – The
Widget
to use as caption for the slide.