# Alepha - React Ui

## Installation

Part of the `alepha` package. Import from `alepha/react/ui`.

```bash
npm install alepha
```

## Overview

Persisted UI state: color mode, theme palette, sidebar collapsed state.

Backed by an `alepha-ui` cookie so preferences survive reloads and are
available during SSR (no flash of wrong theme).

## API Reference

### React Hooks

- [`useColorMode`](https://latest.alepha.dev/docs/reference-react-hooks-usecolormode.md) - Read and update the user's color-mode preference. `"system"` resolves to
- [`useSidebarState`](https://latest.alepha.dev/docs/reference-react-hooks-usesidebarstate.md) - Read and update the sidebar collapsed state. The value is persisted via the
- [`useTheme`](https://latest.alepha.dev/docs/reference-react-hooks-usetheme.md) - Read and update the active theme palette name. UI consumers typically map
- [`useUiState`](https://latest.alepha.dev/docs/reference-react-hooks-useuistate.md) - The visitor's UI preferences, read so that no server render ever depends
