# Content Slider

> Slot-driven slider for promotional banners and content slides, with touch and keyboard navigation.

## Playground

An interactive playground for ContentSlider is embedded above. Open the canonical story on Storybook: [https://storybook.laioutr.cloud/?path=/story/ui-sections-contentslider--default](https://storybook.laioutr.cloud/?path=/story/ui-sections-contentslider--default)

## Overview

`ContentSlider` is the slot-driven slider for hero areas and editorial content rotation: multiple banners, featured posts, campaign slides. All content flows through the default slot, so the slider stays flexible for any content shape. Touch and keyboard navigation work on mobile and desktop.

## Key Business & UX Benefits

- One slider drives hero areas, editorial rotations, and campaign carousels, so brand teams stay on a single motion pattern across the site.
- Hybrid `slot` and `query` data sources let marketing curate the homepage by hand while keeping blog excerpts auto-fresh.
- Touch and keyboard navigation work consistently on mobile, desktop, and assistive tech, protecting accessibility and conversion alike.
- Editors compose slides in Studio, shipping new hero rotations the same hour the creative lands.

<tip>

Pro-Tip from Larry: Use `dataSource: 'query'` for blog excerpt sliders and let the slot mode handle hand-curated campaign content.

</tip>

## Usage

#### Example: LContentSlider

Live preview: [https://storybook.laioutr.cloud/?path=/story/ui-sections-contentslider--landscape-media](https://storybook.laioutr.cloud/?path=/story/ui-sections-contentslider--landscape-media)

## Feature List

<features :items="["Slot-driven slider hosts banners, featured posts, and campaign slides through the default slot for flexible content shapes","Touch and keyboard navigation work consistently on mobile, desktop, and assistive tech","One slider drives hero areas, editorial rotations, and campaign carousels, keeping one motion pattern across the site"]">



</features>

## API Reference

#### Props

```json
{"type":"object","properties":{"heading":{"type":"string"},"surfaceTone":{"enum":["light","dark","bright"],"type":"string"},"textPosition":{"enum":["center","left","right"],"type":"string","default":"left"},"navigationPosition":{"enum":["top","bottom"],"type":"string","default":"top"},"hasScrollbar":{"type":"boolean","default":false},"caption":{"type":"string"},"captionColor":{"type":"string"},"captionSize":{"enum":["s","m","l","xl","xs","sm","ml","2xl","3xl","4xl"],"type":"string"},"headingAs":{"description":"Semantic HTML element for the heading (h1-h6 or div). Defaults to h2.","enum":["h1","h2","h3","h4","h5","h6","div"],"type":"string"},"headingColor":{"type":"string"},"headingSize":{"enum":["s","m","l","xl","xs","sm","ml","2xl","3xl","4xl"],"type":"string"},"subline":{"type":"string"},"sublineColor":{"type":"string"},"sublineSize":{"enum":["s","m","l","xl","xs","sm","ml","2xl","3xl","4xl"],"type":"string"},"sublineAs":{"description":"Semantic HTML element for the subline (p, h2-h6, div). Defaults to p.","enum":["h1","h2","h3","h4","h5","h6","div","p"],"type":"string"},"cta":{"type":"object","properties":{"text":{"type":"string"},"link":{"type":"string"},"variant":{"enum":["primary","secondary","secondary-white","tertiary","ghost-black","ghost-white","glass-black","glass-white","positive","danger","subtle","close-black","close-white","info","adaptive-primary","adaptive-secondary","adaptive-ghost"],"type":"string"},"size":{"enum":["s","m","l","xs"],"type":"string"}},"additionalProperties":false,"required":["text","link","variant"]}},"required":["heading"]}
```

#### Slots

```json
[{"name":"default","type":"{}","description":"","schema":{"kind":"object","type":"{}","schema":{}}}]
```
