Carousel
A wrapper for Tiny Slider for slideshow/carousel layouts. (http://ganlanyuan.github.io/tiny-slider/)
Default
Sage Component
SageCarousel
<h3>Default</h3>
<%= sage_component SageCarousel, {
options: {
fixedWidth: 544,
gutter: 24,
loop: false,
mouseDrag: true,
},
} do %>
<%= content_for :sage_carousel_items do %>
<% 6.times do %>
<%= sage_component SageNextBestAction, {
card_color: "draft",
dismissable: true,
dismiss_attributes: {
onclick: "console.log('Add your own dismiss functionality here!')",
},
graphic: {
element: image_tag("next_best_action_graphic.png", alt: ""),
},
title: "Offer an additional buy with Upsell",
} do %>
<%= content_for :sage_next_best_action_description do %>
<p>Maximize your profit by adding an Upsell to your order flow. This section might wrap to two lines.</p>
<% end %>
<%= content_for :sage_next_best_action_actions do %>
<%= sage_component SageButton, {
style: "primary",
value: "Add an Upsell",
} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
Property | Description | Type | Default |
---|---|---|---|
|
Pass options that map to options available via Tiny Slider. |
|
|
|
This option is automatically set by the component. |
|
|
|
This option is automatically set by the component. The arrows use custom styling and layout. |
|
|
|
When the option |
|
|
|
This option is automatically set by the component. The dots use custom styling and layout. |
|
|
Sections |
|
||
|
Carousel items can contain any component from Sage. |
Arbitrary |
Use same-level, same-type elements or components.
Provide these options, as they are set manually:
container
,controls
,nav
.