# Cherry Design System > Full documentation for Cherry Design System. --- # Introduction > Cherry is a design system for the modern web. Designed in Figma, built in React using TypeScript and Styled Components. Source: https://cherry.al/ # Cherry Design System Cherry is a design system for the modern web. Designed in Figma, built in React using TypeScript. In the world of design and development, consistency is key. Every page, every component, and every interaction should adhere to a set of fundamental principles. The Cherry Design System is your reliable companion for maintaining harmony between design and development. ## Why a Design System? 1. **Consistency** - A design system ensures that basic elements remain consistent across all pages. Whether it's buttons, typography, or spacing, users should experience a seamless visual language. 2. **Efficiency** - For meticulously crafted projects, a robust design system streamlines workflows. It bridges the gap between designers and developers, fostering collaboration and efficiency. 3. **Foundations** - A good design system lays down the groundwork. It establishes rules, guidelines, and best practices, allowing teams to build upon a solid foundation. ## What Cherry Offers - **Figma Designs** - Meticulously crafted Figma designs for all the design primitives. From buttons to inputs, we've got you covered. - **Figma Plugin** - Extract default theme tokens automatically, ensuring consistency across your entire project. - **Open Source React Components** - Cherry provides open source React components via `cherry-styled-components` for the default implementation. Meant to be customized and built upon. - **Theming & Dark Mode** - Fully typed light and dark themes with SSR-safe, flash-free dark mode. Cherry intentionally focuses on providing the essential building blocks that most interfaces require. Simplicity often leads to elegance. These docs are split in two: you are reading the **Design** section; switch to **Code** in the header for installation and the full component API. See every component in one interactive playground. Start with the Figma template and plugin. Explore the color palette for light and dark modes. Typography scales for desktop and mobile. Shadow elevation system for depth and hierarchy. Over 1,500 Lucide icons on a consistent grid. Install cherry-styled-components and set up the providers. Props and usage docs for every React component. --- # Figma > Get started with the Cherry Design System Figma template and plugin for extracting design tokens. Source: https://cherry.al/figma # Figma When embarking on the design process, Figma is an excellent tool to kick things off. ## 1. Download the Template Begin by obtaining the Cherry template from Figma Community. This serves as your foundation for all design work. ## 2. File Structure: Pages The template is organized into four pages: - **๐ŸŽจ Foundations** - The design primitives, grouped into sections: **Color** (the full palette previewed in light and dark mode), **Typography** (heading and body styles at desktop and mobile sizes), and **Elevation** (shadow styles). - **๐Ÿงฉ Components** - Reusable design elements that streamline your workflow. Every component is a variant set bound to the Figma variables, so all of them adapt to dark mode automatically: Button, IconButton, Input, Password, Textarea, Select, Checkbox, Radio, Toggle, Range, ThemeToggle, Modal, Toast, Accordion, Tabs, Dropzone, and AvatarDropzone. The section also includes the assembled Tabs component and a Box helper. - **๐ŸŒ Examples** - A sample landing page composed entirely of Cherry components, provided in light and dark mode. - **๐ŸŒ Assets** - Icons associated with a website or application: favicons, Apple touch icons, Google manifest icons, and the Open Graph social image. ## 3. Figma Variables Cherry uses Figma variables to store design values. These values create design tokens. Variables are organized into collections: | Variable Collection | Purpose | | ------------------- | ---------------------------------------------------------------------------------------------------------------------- | | **Colors** | Color values grouped into Primary, Secondary, Tertiary, Gray, and UI, with a Light Mode and a Dark Mode | | **Font Family** | Font families for text, headings, and monospace | | **Font Sizes** | Font size definitions with `lg` (desktop) and `xs` (mobile) modes | | **Font Weights** | Font weights for text, headings, and buttons (Figma preview only - the extracted theme file has no font-weight tokens) | | **Grid Gap** | Grid gaps for visually appealing layouts | | **Line Heights** | Line height definitions with `lg` (desktop) and `xs` (mobile) modes | | **Max Width** | Max width values for `xs` and `xxxl` | | **Media Queries** | Breakpoints: `xs`, `sm`, `md`, `lg`, `xl`, `xxl`, `xxxl` | | **Padding** | Padding sizes for `xs` and `lg` | | **Radius** | Border radius for `xs`, `lg`, and `xl` | ## 4. Typography Inside Figma, typography is driven by the Font Family, Font Sizes, Font Weights, and Line Heights variables. Adjust the definitions there and you'll see a live preview in the Typography section of the Foundations page. Keep in mind that Font Weights only affect the Figma preview: the theme file has no font-weight tokens, since weights are set directly in each component's CSS. ## 5. Local Styles Local styles are only used for shadows. There are two sets of five elevations (`XS` to `XL`): one for light mode and one for dark mode (`Dark/XS` to `Dark/XL`). They are previewed in the Elevation section of the Foundations page. ## 6. Extract Design Tokens Cherry has its own **Figma Plugin** to extract design tokens automatically. The plugin gives you the theme file - copy it into your app's theme file (for example `app/theme.ts`) and pass it to the theme provider. See the [Theme](/code/theme) page for how to consume a custom theme object. --- # Colors > Cherry's curated color palette with 18 predefined colors for light and dark themes. Source: https://cherry.al/colors # Colors Cherry offers a curated set of predefined colors to kickstart your interface design. Depending on your specific requirements, you can always tweak or expand this palette. However, in most scenarios, the default palette of 18 colors should suffice. ### Primary ### Secondary ### Tertiary ### Gray ### Status ### Neutrals In addition to the primary color palette, Cherry provides the same variables for Dark Mode. This allows seamless switching between light and dark modes with a single click in Figma. ### Primary ### Secondary ### Tertiary ### Gray (Dark Mode) ### Status ### Neutrals (Inverted) ## Using the tokens Every color above is available as a token on the theme object, so you can reference it by name in any styled-component: ```tsx const Title = styled.h2` color: ${({ theme }) => theme.colors.primary}; `; ``` To use these colors in code, see the [Theme](/code/theme) and [Dark Mode](/code/dark-mode) pages. Colors can be found in the Figma Template in the Color section of the Foundations page. --- # Typography > Cherry's responsive typography system with definitions for desktop and mobile breakpoints. Source: https://cherry.al/typography # Typography Cherry offers two distinct sets of typography definitions: one for desktop and another for mobile. These comprehensive definitions ensure that type displays correctly on screens of all sizes. The **Desktop (LG)** values apply from the `lg` breakpoint (992px) and up, while the **Mobile (XS)** values are the base scale used on narrower screens. | Style | Font | Size | Line Height | Weight | | ------------ | ----- | ----- | ----------- | ------ | | Hero1 | Inter | 128px | 1.1 | 700 | | Hero2 | Inter | 96px | 1.1 | 700 | | Hero3 | Inter | 72px | 1.1 | 700 | | H1 | Inter | 60px | 1.4 | 700 | | H2 | Inter | 36px | 1.5 | 700 | | H3 | Inter | 30px | 1.5 | 700 | | H4 | Inter | 24px | 1.5 | 700 | | H5 | Inter | 20px | 1.5 | 700 | | H6 | Inter | 18px | 1.6 | 700 | | Text | Inter | 16px | 1.7 | 400 | | Strong | Inter | 16px | 1.7 | 700 | | Small | Inter | 14px | 1.7 | 400 | | Blockquote | Inter | 18px | 1.7 | 400 | | Code | Mono | 16px | 1.7 | 400 | | Button Small | Inter | 14px | 1.0 | 600 | | Button | Inter | 16px | 1.0 | 600 | | Button Big | Inter | 18px | 1.0 | 600 | | Input Small | Inter | 14px | 1.0 | 400 | | Input | Inter | 16px | 1.0 | 400 | | Input Big | Inter | 18px | 1.0 | 400 | | Style | Font | Size | Line Height | Weight | | ------------ | ----- | ---- | ----------- | ------ | | Hero1 | Inter | 72px | 1.1 | 700 | | Hero2 | Inter | 60px | 1.1 | 700 | | Hero3 | Inter | 36px | 1.2 | 700 | | H1 | Inter | 40px | 1.5 | 700 | | H2 | Inter | 30px | 1.5 | 700 | | H3 | Inter | 28px | 1.3 | 700 | | H4 | Inter | 26px | 1.3 | 700 | | H5 | Inter | 18px | 1.6 | 700 | | H6 | Inter | 16px | 1.6 | 700 | | Text | Inter | 14px | 1.7 | 400 | | Strong | Inter | 14px | 1.7 | 700 | | Small | Inter | 12px | 1.7 | 400 | | Blockquote | Inter | 16px | 1.7 | 400 | | Code | Mono | 14px | 1.7 | 400 | | Button Small | Inter | 14px | 1.0 | 600 | | Button | Inter | 16px | 1.0 | 600 | | Button Big | Inter | 18px | 1.0 | 600 | | Input Small | Inter | 14px | 1.0 | 400 | | Input | Inter | 16px | 1.0 | 400 | | Input Big | Inter | 18px | 1.0 | 400 | The Weight column is part of the design spec. In code, the typography mixins only set `font-size` and `line-height`, so heading weights come from the browser's bold defaults for `h1` to `h6` unless you set `font-weight` yourself. The Button (600) and Input (400) components set their own weights. ## Usage Nearly every style above is available as a ready-made CSS mixin exported from `cherry-styled-components`: `styledHero1`, `styledHero2`, `styledHero3`, `styledH1` through `styledH6`, `styledText`, `styledStrong`, `styledSmall`, `styledBlockquote`, `styledCode`, `styledButton`, `styledButtonBig`, `styledInput`, and `styledInputBig`. Each mixin takes the theme and returns the responsive `font-size` and `line-height`, switching from the mobile to the desktop values at the `lg` breakpoint: ```tsx import styled from "styled-components"; import { styledH1 } from "cherry-styled-components"; const Title = styled.h2` ${({ theme }) => styledH1(theme)} `; ``` For scales without a dedicated mixin (like Button Small and Input Small) or for custom theme keys, use the `createTypographyStyle` factory, e.g. `createTypographyStyle("buttonSmall")`. To apply these styles in code, use the exported [typography helpers](/code/typography), and see [Theme](/code/theme) for font tokens. Styles can be found in the Figma Template in the Typography section of the Foundations page. --- # Shadows > Cherry's shadow elevation system with five levels for light and dark modes. Source: https://cherry.al/shadows # Shadows Cherry offers several shadow variations that allow you to create elevations and add depth to your interfaces. Shadows play a crucial role in enhancing the visual hierarchy of elements, providing a sense of depth and realism. There are two sets of shadows, one for dark mode and one for light mode.