Included in:
Not included in any file!
Depends from:
LayoutMixins.align-center
LayoutMixins.flex
LayoutMixins.flex-center
Local variables:
--slideshow-padding: 1.25rem
--slideshow-max-width: 780
--slideshow-height: 440
--slideshow-transition: 600ms cubic-bezier(0.2,0,0.5,1) 0s
--slideshow-border-radius: var(--radius-lg, .5rem)
--slideshow-arrow-size: 2.5rem
--slideshow-arrow-color: var(--color-accent)
--slideshow-arrow-background: var(--color-white)
--slideshow-arrow-border-radius: var(--radius-full, 9999px)
--slideshow-arrow-shadow: 0 6px 20px 0 rgba(36, 41, 47, .4)
--slideshow-control-size: .625rem
--slideshow-control-gap: .375rem
--slideshow-controls-border-radius: var(--radius-full, 9999px)
--slideshow-max-width: 100%
--slideshow-max-width: 340px
component
Slideshow
A full carousel component with arrows, dragging and dots control.
You can change the width of the slideshow by changing the --slideshow-max-width value.
The slideshow height property is controlled by JavaScript. When it loads, the --slideshow-height variable is set to the active slideshow image height. This property is also use for other calculations like the top porperty of the arrows controls.
Basic usage
- The default
--slideshow-max-widthvariable is set to 780px:
- If you need to show some ebooks, you can use the
is-ebook-previewermodiffier on the slideshow main container. The--slideshow-max-widthvariable will be set to 340px:
- You can combine it with captions:
- You can set it up to full width by applying the
is-fullwidthmodiffier to it which will set the--slideshow-max-widthvariable to 100%.
JavaScript
Variables
:root {
--slideshow-padding: 1.25rem;
--slideshow-max-width: 360px;
--slideshow-height: 452px;
--slideshow-transition: 600ms cubic-bezier(0.2,0,0.5,1) 0s;
--slideshow-border-radius: var(--radius-lg, .5rem);
--slideshow-arrow-size: 2.5rem;
--slideshow-arrow-color: var(--color-accent);
--slideshow-arrow-background: var(--color-white);
--slideshow-arrow-border-radius: var(--radius-full, 9999px);
--slideshow-arrow-shadow: 0 6px 20px 0 rgba(36, 41, 47, .4);
--slideshow-control-size: .625rem;
--slideshow-control-gap: .375rem;
--slideshow-controls-border-radius: var(--radius-full, 9999px);
}