DRAFT DESIGN PENDING IMPLEMENTATION PENDING
A flexible, content-agnostic component for carousels where users may cycle through a row of elements that overflows its container.
Contributors | |
---|---|
Slack channel | |
Paragon Jira ticket | |
Other Jira tickets | |
Design resources | |
Technical docs |
Design
TBD
π³ Variants
Brainstorming based on existing known use cases for Carousel
(see screenshots below):
Default icon buttons (left/right arrows) should be overridable, if needed.
Size
Icons
location of the arrows needs to be determined (outside or inside the carousel itself)
location of the arrows (either side of the carousel or close together)
Size
Dictating spacing within the carousel (padding) and the default icon button sizes
Should we be able to customize how many items are shown at once?
How will the width of each item factor into figuring out how many can be shown at once? E.g., a
Card
is much wider than aChip
.
Should we be able to control the left/right arrow icon button behavior?
E.g., does it scroll all the way to the next N items all at once (like the edX.org partner logo carousel) or does it scroll incrementally based on some hardcoded pixel value and show partial items (like the edX.org
Chip
carousel and the Enterprise Learner PortalCard
carousel shown below) or does it scroll to the start of the next item?Should we have an autoscroll option?
Should it be a wrap-around behavior (once you hit the end, do you go back to the beginning?)
π Best Practices
Do | |
Don't |
β Related Components
Existing Carousel
component in Paragon
We have an existing Carousel
component in Paragon via react-bootstrap
.
Paragon documentation: https://paragon-openedx.netlify.app/components/carousel/
react-bootstrap
documentation: https://react-bootstrap.github.io/components/carousel/
It defines a top-level Carousel
component with a Carousel.Item
subcomponent that denotes each βslideβ within the carousel. It also has a Carousel.Caption
sub-component to be used inside of Carousel.Item
.
The Carousel
we have today supports an optional fade
prop to have the carousel items fade in/out instead of slide.
The Carousel
component as we have it today does not seem to support the use case where you can see more than one carousel item at once and scroll left/right of the overflow with the left and right arrow icon buttons.
Carousel use cases observed throughout the platform
Carousel of partner image logos on edx.org:
Carousel of Chip
components on edx.org:
Carousel of Card
components in UI mock:
Note how these 3 use cases are not so much flipping between carousel items, but instead, scrolling through a horizontal row of content that overflows outside of its container controlled via the left/right arrow icon buttons.
π Specification
What does an engineer need to know in order to build this component? TBD.
Redlined Design Spec
β Behaviors
π Accessibility
Notes
Notes from collaborator conversations or meetings regarding this component.