# Horizontal Story

> Vertical scrolling moves chapters sideways.

```tsx
import { HorizontalStory } from '@brand-studio/ui';
import { chapters } from '@/demos/assets';

export default function HorizontalStoryDemo() {
  return <HorizontalStory title="From bean to cup." chapters={chapters} />;
}
```

## Installation

```sh
npm install @brand-studio/ui
```

React 18 or 19 is a peer dependency. Import the stylesheet once and wrap the app in a brand theme:

```tsx
import '@brand-studio/ui/styles.css';
import { BrandTheme, HorizontalStory } from '@brand-studio/ui';
import brand from './brand.json';

<BrandTheme palette={brand.tokens} mode="system">
  {/* your app */}
</BrandTheme>
```

## Usage

```tsx
import { HorizontalStory } from '@brand-studio/ui';
```

```tsx
<HorizontalStory title="From bean to cup." chapters={chapters} />
```

## Accessibility

- On wide screens with motion allowed, scrolling down moves the chapters sideways.
- On phones and under reduced motion it is a swipeable row you can also scroll with the arrow keys.

## API Reference

| Prop | Type | Default |
|---|---|---|
| `title` | `string` | – |
| `chapters` | `StoryChapter[]` | – |
| `className?` | `string` | `''` |

Source: https://brandstudio.js.org/docs/components/horizontal-story/
