-
Notifications
You must be signed in to change notification settings - Fork 212
Open
Labels
🌟 feature requestNew feature or requestNew feature or request
Description
Context:
Chrome 135 introduced a powerful set of CSS features enabling native carousels:
- ::scroll-button() and ::scroll-marker()
- :has()
- scroll-snap-type
- Improved accessibility and keyboard interaction support baked into the browser
These enable lightweight, declarative carousels with little or no JS, great for performance and simplicity.
Proposal:
Add a new native-css prop/mode that renders minimal markup and styles, relying on native CSS behavior for carousel functionality.
Implementation Notes:
- Prop: nativeCss: boolean
- When enabled:
- Skip JS-based slide logic, pagination, etc.
- Output a scrollable container with scroll-snap-type
- Use semantic HTML (e.g.,
<ul><li>
for slides) - Optionally enhance with scroll indicators if ::scroll-marker() is supported
- Consider feature detection to fall back to JS mode if browser support is insufficient.
Future Considerations:
- Add internal utility for feature detection (e.g., CSS.supports)
- Allow progressive enhancement: JS pagination or navigation overlays can still be used
- Provide a small example in docs for usage in native mode
References:
Metadata
Metadata
Assignees
Labels
🌟 feature requestNew feature or requestNew feature or request