# Overview

> Get started with Cherry's React components built with Styled Components and TypeScript.

Source: https://docs.cherry.al/v1/code

> For the complete documentation index, see [llms.txt](https://docs.cherry.al/llms.txt).

# Develop

Every component in the **Cherry Design System** is meticulously crafted using **React** and **Styled Components**. These building blocks empower you to create delightful user interfaces.

<Install>cherry-styled-components styled-components</Install>

## Components

<Columns cols={2}>
  <Card title="Accordion" icon="chevrons-up-down" href="/v1/code/accordion">
    Show and hide content behind a clickable, animated title.
  </Card>
  <Card title="Avatar" icon="circle-user" href="/v1/code/avatar">
    Circular identity badge with image, initials, and icon fallbacks.
  </Card>
  <Card title="AvatarDropzone" icon="circle-user-round" href="/v1/code/avatar-dropzone">
    Circular single-file dropzone for profile pictures.
  </Card>
  <Card title="Button" icon="mouse-pointer-click" href="/v1/code/button">
    The gateway to interaction. Various styles and states.
  </Card>
  <Card title="Callout" icon="message-square-warning" href="/v1/code/callout">
    Tinted admonition boxes with five semantic intents.
  </Card>
  <Card title="Dropzone" icon="upload" href="/v1/code/dropzone">
    File drop target with drag & drop, validation, and previews.
  </Card>
  <Card title="Icon" icon="smile" href="/v1/code/icon">
    Render any Lucide icon by name.
  </Card>
  <Card title="IconButton" icon="circle-plus" href="/v1/code/icon-button">
    Circular icon-only button for compact actions.
  </Card>
  <Card title="Input" icon="text-cursor-input" href="/v1/code/input">
    Text fields, checkboxes, radio buttons - everything input-related.
  </Card>
  <Card title="Modal" icon="app-window" href="/v1/code/modal">
    Animated dialog with Escape and outside-click dismissal.
  </Card>
  <Card title="Password" icon="key-round" href="/v1/code/password">
    Password input with a built-in show/hide reveal toggle.
  </Card>
  <Card title="Prose" icon="pilcrow" href="/v1/code/prose">
    Cherry typography for rendered markdown and long-form content.
  </Card>
  <Card title="Range" icon="sliders-horizontal" href="/v1/code/range">
    Sliders for numeric input.
  </Card>
  <Card title="Select" icon="chevron-down" href="/v1/code/select">
    Dropdown menus for options.
  </Card>
  <Card title="Spinner" icon="loader-circle" href="/v1/code/spinner">
    Rotating loading indicator with theme-aware color.
  </Card>
  <Card title="Tabs" icon="panels-top-left" href="/v1/code/tabs">
    Accessible tabbed panels with keyboard navigation.
  </Card>
  <Card title="Textarea" icon="notebook-text" href="/v1/code/textarea">
    Multiline text input for longer messages.
  </Card>
  <Card title="ThemeToggle" icon="sun-moon" href="/v1/code/theme-toggle">
    Pill-shaped sun/moon switch for light and dark mode.
  </Card>
  <Card title="Toast" icon="bell" href="/v1/code/toast">
    Stacked notifications with status tiles, actions, and promise states.
  </Card>
  <Card title="Toggle" icon="toggle-right" href="/v1/code/toggle">
    Simplify binary choices.
  </Card>
</Columns>

## Chat Kit

Everything needed to build an AI-assistant chat UI: a headless provider that owns the transcript and streaming bookkeeping, plus presentational components. You bring the transport.

<Columns cols={2}>
  <Card title="Chat Kit & ChatProvider" icon="bot-message-square" href="/v1/code/chat">
    Architecture, the provider, the useChat hook, and showcase mode.
  </Card>
  <Card title="ChatPanel" icon="panel-right" href="/v1/code/chat-panel">
    The shell: side drawer, inline container, or fullscreen dialog.
  </Card>
  <Card title="Chat Messages" icon="messages-square" href="/v1/code/chat-messages">
    Transcript list, message bubbles, typing indicator, source chips.
  </Card>
  <Card title="ChatInput" icon="send" href="/v1/code/chat-input">
    Auto-growing composer with an optional rainbow glow.
  </Card>
  <Card title="ChatLauncher" icon="sparkles" href="/v1/code/chat-launcher">
    The "Ask AI" pill that toggles the panel.
  </Card>
</Columns>

## Layout

<Columns cols={2}>
  <Card title="Box" icon="box" href="/v1/code/box">
    The versatile container for layout, spacing, or as a wrapper.
  </Card>
  <Card title="Col" icon="columns-3" href="/v1/code/col">
    Create responsive column layouts with ease.
  </Card>
  <Card title="Container" icon="square" href="/v1/code/container">
    A container for your content.
  </Card>
  <Card title="Flex" icon="stretch-horizontal" href="/v1/code/flex">
    Arrange items horizontally or vertically.
  </Card>
  <Card title="Grid" icon="grid-3x3" href="/v1/code/grid">
    Build grids effortlessly using CSS grid.
  </Card>
  <Card title="MaxWidth" icon="move-horizontal" href="/v1/code/max-width">
    Control the maximum width of your content.
  </Card>
  <Card title="Space" icon="stretch-vertical" href="/v1/code/space">
    Responsive vertical or horizontal spacing between elements.
  </Card>
</Columns>

## Cherry Helpers

<Columns cols={2}>
  <Card title="Global Styles" icon="globe" href="/v1/code/global-styles">
    Consistency across your app. Define global rules here.
  </Card>
  <Card title="Hooks" icon="webhook" href="/v1/code/hooks">
    `useOnClickOutside`, `useMediaQuery`, `useBelowBreakpoint`, and `useLockBodyScroll`.
  </Card>
  <Card title="Mixins" icon="blend" href="/v1/code/mixins">
    Reusable code snippets. Efficiency meets elegance.
  </Card>
  <Card title="Theme" icon="paintbrush" href="/v1/code/theme">
    Define spacings, colors, typography, and more.
  </Card>
  <Card title="Icons" icon="smile" href="/v1/code/icon">
    Basic icons for elements like checkbox and dropdown arrow.
  </Card>
  <Card title="Typography" icon="type" href="/v1/code/typography">
    Text matters. Set font styles and sizes effortlessly.
  </Card>
</Columns>

## Styled Components Helpers

- **[StyledComponentsRegistry](/v1/code/installation)** - Renders CSS in your Next.js app. Imported from `cherry-styled-components/next`.
- **[CherryThemeProvider](/v1/code/installation)** - Wrap your app with the Cherry Theme context.
- **[ClientThemeProvider](/v1/code/dark-mode)** - The full theme provider, with `theme-color` meta sync, for flash-free dark mode in server-rendered apps.
- **[themeInitScript / createThemeInitScript](/v1/code/dark-mode#createthemeinitscript)** - Blocking head script that sets the mode before the first paint.
- **[resolveTheme](/v1/code/dark-mode#resolvetheme)** - Resolve the `theme` cookie to a theme object in server code.
- **[ThemeContext](/v1/code/dark-mode#manual-theme-toggle)** - Access `toggleTheme` and `setPreference` for custom mode controls.
- **[useColorMode / useResolvedTheme](/v1/code/dark-mode#usecolormode)** - Read the mode and preference, or the theme with real color values.
- **[createThemeVariables](/v1/code/theme#createthemevariables)** - Build the CSS-variable theme and its stylesheet, in server or client code.
- **[modes / modeValue](/v1/code/dark-mode#styles-that-differ-by-mode)** - Write a style that differs by light and dark mode.

## Next Steps

<Columns cols={2}>
  <Card title="Live Demo" icon="play" href="https://v1.cherry.al/">
    See every component in one interactive playground.
  </Card>
  <Card title="Installation" icon="download" href="/v1/code/installation">
    Get started with development.
  </Card>
  <Card title="Dark Mode" icon="moon" href="/v1/code/dark-mode">
    Flash-free dark mode that switches without re-rendering.
  </Card>
  <Card title="Changelog" icon="history" href="/v1/code/changelog">
    Release notes for every version.
  </Card>
</Columns>
