Write design system guidelines for Make kits
When using a Make kit in Figma Make, it’s critical to craft great guidelines.
Authoring guidelines for a Make kit is similar to authoring the documentation you'd give a new engineer at your company to teach them how to properly use the design system. And if you have existing design system documentation or a Storybook, you have the content you need to author guidelines!
To make it even easier, Figma Make can read your design package and create guidelines for you when you’re assembling your Make kit. This removes the big lift with initially authoring guidelines. Learn more in Get started with Make kits.
Whether you choose to generate guidelines or you want to build your own, we provide some best practices that you can apply.
Important considerations
Here are a few important considerations to keep in mind:
- It’s good to have subfolders. The structure of your guidelines helps Figma Make organize its thinking. Organize guidelines into folders based on what the files describe and how they should be used. See Guidelines structure
- Frame your guidelines to describe “what” and “how”. The content of your guidelines files should be clear and precise, a balance of “here’s what this is” and “here’s how you use it”. It’s good to be granular in your approach. See Guidelines content
- Multiple short guidelines files are better than a few large files. Build your guidelines with progressive disclosure and the size of the context window in mind.
Many short files for specific areas of the design system are better than a small number of lengthy guidelines. Include overview files that route Figma Make to more specific guidelines. This helps Figma Make find only what it needs to be successful while not flooding its context window. See Overview guidelines
Guidelines structure
Every Figma Make file has a guidelines/ folder, but Make kits provide even more opportunity to create granular guidelines for your design package. You also add new folders and guideline files to your Make kit, which for documenting specific components or sets of design tokens.
When you create a Make kit with a design package, here are the initial places guidelines files appear:
├── guidelines/
│ ├── components/
│ ├── Guidelines.md
│ ├── setup.md
│ ├── styles.md
│ └── tokens.md
├── src/
│ ├── [your application code here]
├── package.json
├── ATTRIBUTIONS.md
├── postcss.config.mjs
└── vite.config.ts
When you’re done creating guidelines, though, especially granular guidelines for your tokens and components, your Make kit may look a little more like this:
├── guidelines/
│ ├── components/
| ├── button.md
| ├── icons.md
| ├── navigation.md
| ├── overview.md
| └── tabs.md
│ ├── composition/
| ├── hierarchy.md
| ├── icons.md
| ├── layout.md
| ├── overview.md
| └── surfaces.md
├── foundations/
| ├── color.md
| ├── icons.md
| ├── modes.md
| ├── spacing.md
| └── input_styling.md
│ ├── icon-discovery.md
│ ├── setup.md
│ └── overview.md
├── src/
│ ├── [your application code here]
├── package.json
├── ATTRIBUTIONS.md
├── postcss.config.mjs
└── vite.config.ts
The above file structure is just an example to give you inspiration. You may find you want even more granular guidelines. You might also prefer a simpler approach. What’s important is finding the balance that gets you reliable, high quality outcomes.
Note some important qualities about the example file structure:
- Guidelines files are arranged in folders that correspond to the parts of the design system, such as the components and foundation styles.
- Multiple overview guidelines are provided. This lets you provide additional, focused guidance for those parts of your design system.
- Setup and overview guidelines files appear at the root of the guidelines folder structure. These are used to route Figma Make to the appropriate granular files and give a broad overview of how each folder is used.
Guidelines content
When writing guidelines for Figma Make, use clear, concise language: "Do not use small text for anything except captions" is better than "Use small text sparingly". Be specific and imperative in your instructions.
Guidelines.md: top-level guidelines
Guidelines.md is the initial set of guidelines that Figma Make always looks at first. You can change the name of this file to better suit the needs of your design system. For example, the earlier file structure changes the file name to overview.md.
This file is a good place to introduce your design system and give Figma Make a sense of the available components and tokens. It should also explain to Figma Make the other guidelines files that exist and when they should be used.
You shouldn’t use the top-level guidelines file to capture everything about your design system. Instead, use it as an opportunity to give Figma Make a high-level introduction to your design system, and then link out to additional, more granular overview files.
Example: Guidelines.md
# Astra UI Design System Guidelines
## Product character
This is a **B2C SaaS** product with a **minimal, clean, simple** UI style.
- **Density**: Breathable — generous whitespace, compact but not cramped
- **Surface strategy**: Layered — branded `brand-tertiary` canvas with `surface-bg` cards floating on top. Surface color creates hierarchy, not borders.
- **Color palette**: ~90% neutral surfaces. Brand color (`brand-primary`) is used sparingly for primary actions, active states, and small accents only. The `brand-tertiary` lavender canvas provides ambient identity.
- **Corner style**: Rounded (`corner-md` 8px default, `corner-lg` 16px for cards/overlays, `corner-full` for buttons/avatars)
- **Elevation**: Surface-color-driven — shadows reserved for floating overlays (toolbar, modal) only
## Reading order
**MUST READ before writing any code:**
1. This file (`overview.md`) — product character, rules, and workflows
2. `setup.md` — providers, CSS imports, build configuration
3. `foundations/` — all token files (color, typography, spacing, surfaces)
4. `components/overview.md` — full component catalog with alternative names
**Read on-demand:**
- `components/{name}.md` — read BEFORE using that component
- `composition/` — read when building page layouts or combining components
## Workflows
### Before using a component
1. Check `components/overview.md` for the component catalog
2. Read `components/{name}.md` for the specific component
3. Follow all rules, valid props, and usage notes in the guidelines file
4. Do NOT write code using a component until you have read its guidelines file
### Before using an icon
1. Check `icon-discovery.md` for available icons
2. Do NOT guess icon names — verify the icon exists first
3. If an icon doesn't exist, pick a different one and verify
4. Icons are ALWAYS imported from `lucide-react`, never from `@brettmcm/astraui`
### When building a layout
1. Read `composition/layouts.md` for page structure patterns
2. Read `composition/surfaces.md` for layering and background rules
3. Start with `SidebarNavigation` — every desktop page includes it
4. Apply spacing tokens — never hardcode pixel values
5. Use `brand-tertiary` as the page canvas, `surface-bg` for elevated content
## Rules
IMPORTANT: Every desktop page MUST include `SidebarNavigation` — the 60px dark icon rail on the far left. No exceptions.
IMPORTANT: The page background is ALWAYS `brand-tertiary`. Never use white or gray as the page canvas. Content cards use `surface-bg` and float on top.
IMPORTANT: Do NOT use `brand-primary` or `brand-secondary` as backgrounds for large areas — they are for small accents and interactive highlights only.
- Always use design system components over raw HTML elements (`InputField` not `<input>`, `SelectField` not `<select>`)
- All spacing must use design system tokens (`gap-xl`, `p-2xl`) — never hardcode pixel values
- Surface color defines layout hierarchy, not borders — do not add borders between layout regions
- Borders are for interactive elements only (buttons, inputs, clickable cards, floating overlays)
- Icons always come from `lucide-react` — never create inline SVGs or guess icon names
- Navigation hierarchy is strict: `SidebarNavigation` → `SecondaryNav` → `Tabs`. Never skip levels.
- Each logical section gets its own `surface-bg` card — never combine unrelated sections
- Complexity is revealed progressively — hide occasional controls behind expand, hover, or click
setup.md: Design system dependencies
setup.md starts with an initial set of instructions to tell Make to use your design system package instead of the default components included with Figma Make files. However, you can add additional technical instructions and dependencies. This can be useful if you have other files in your Make kit that Figma Make should use when generating results for you.
Example: setup.md
# Project Setup
## Required CSS imports
Import the styles directly from the package into the main .css file to make them available globally
```tsx
import '@brettmcm/astraui/styles.css'
```
Do NOT add `@source` rules for this package in the consumer's Tailwind config. The package ships pre-compiled CSS with all required utility classes.
## Theme provider
Wrap your app root with `ThemeProvider`. This is required for dark mode support and theme persistence.
```tsx
import { ThemeProvider } from '@brettmcm/astraui'
function App() {
return (
<ThemeProvider>
{/* app content */}
</ThemeProvider>
)
}
```
`ThemeProvider` reads `localStorage('astra-theme')` on mount and falls back to `prefers-color-scheme`. It manages the `.dark` class on `<html>` automatically.
### Theme hook
Use `useTheme` in any child component to read or toggle the theme:
```tsx
import { useTheme } from '@brettmcm/astraui'
function ThemeToggle() {
const { theme, toggleTheme, setTheme } = useTheme()
return <Button onClick={toggleTheme}>{theme}</Button>
}
```
`ThemeProvider` must be an ancestor of any component calling `useTheme()`.
## Build configuration
Astra UI is built with Vite and the `@tailwindcss/vite` plugin. The standard `vite.config.ts` for the library:
```tsx
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
})
```
### Library build
Run `npm run build:lib` to produce the distributable package. This outputs:
- ESM (`.mjs`)
- CJS (`.cjs`)
- Pre-compiled CSS
Consumers do NOT need Tailwind configured to use this package — CSS ships pre-compiled.
## Rules
- Do not add `@source` rules for `@brettmcm/astraui` in consumer Tailwind configs
- `ThemeProvider` is required at the app root for dark mode to work
- CSS import order does not matter — there is only one stylesheet
- All styling uses design system tokens mapped via `@theme inline` — use Tailwind classes that reference Astra tokens (e.g. `bg-brand-tertiary`, `gap-xl`), not arbitrary values
Granular overview.md files: overview guidelines
Granular or subfolder overview files are where you can introduce Figma Make to specific aspects of your design system. Common overview files include:
overview-components.mdto explain which components are available and any common usage patterns that apply to all componentsoverview-icons.mdto explain the icon system available in your design system
Every design system is different. To help Figma Make be as successful as possible with your design system, use these files to educate Figma Make the same way you'd teach an engineer who's new to your design system.
Since many short guidelines files are better than only a few lengthy ones, your granular overview files are important for showing Figma Make where to find the guidelines it needs for its tasks.
Example: overview-components.md
# Component Catalog
Always prefer components from `@brettmcm/astraui` over plain HTML elements. Do NOT write code using a component until you have read its guidelines file.
```tsx
import { Button, Avatar, InputField } from '@brettmcm/astraui'
```
## Buttons & actions
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| Button | CTA, action button | Primary, neutral, subtle actions | button.md |
| IconButton | Icon action, circle button | Icon-only circular action button | button.md |
| ButtonGroup | Button bar, action group | Grouped related actions with alignment | button.md |
| FavoriteButton | Like button, star button | Toggle favorite/star state | button.md |
## Inputs & forms
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| InputField | Text input, text field | Single-line text entry with label/description | input.md |
| TextareaField | Multi-line input, text area | Multi-line text entry with label/description | input.md |
| SelectField | Dropdown, select, picker | Dropdown selection from predefined options | input.md |
| SearchComponent | Search bar, search input | Search with animated placeholder | input.md |
| Checkbox | Check, boolean input | Boolean selection with label/description | input.md |
| RadioGroup | Radio buttons, single select | Mutually exclusive choices | input.md |
| SwitchField | Toggle, switch | On/off toggle setting | input.md |
| PromptInput | Chat input, message input | AI prompt text entry with send/attach | ai-agent.md |
## Navigation
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| SidebarNavigation | Sidebar, nav rail, app shell | Persistent 60px icon rail — every page | navigation.md |
| SidebarButton | Nav icon, sidebar icon | Icon button for SidebarNavigation | navigation.md |
| SecondaryNav | Sub-nav, section nav, side panel | Secondary navigation for sub-sections | navigation.md |
| SecondaryNavItem | Sub-nav item, section link | Item within SecondaryNav | navigation.md |
| Tabs | Tab bar, tab switcher | Tertiary content switching within a section | tabs.md |
| SegmentedControl | Switcher, toggle group | Inline icon switcher | tabs.md |
## Media & content
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| Avatar | Profile image, user photo | User/entity profile image or initials | media.md |
| AvatarGroup | Avatar stack, user group | Grouped avatar display with overflow | media.md |
| ItemCard | Video card, content card | Content card with thumbnail and metadata | media.md |
| DurationBadge | Timecode, duration label | Compact timecode label for video thumbnails | media.md |
| VideoControl | Video player, playback controls | Video playback controls with seek bar | media.md |
## Feedback & status
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| Toast | Notification, snackbar | Brief notification with progress | feedback.md |
| Badge | Label, tag, status pill | Status labels and counters | feedback.md |
| Tooltip | Hint, popover, info tip | Contextual hint on hover/focus | feedback.md |
| Modal | Dialog, popup, overlay | Focused task dialog with backdrop | modal.md |
## AI Agent
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| AIVideoCreation | Video creator, new video prompt | Entry point for AI video generation with suggestion chips | ai-agent.md |
| ChatBubbles | Message, chat message | AI or user chat message bubble | ai-agent.md |
| PromptInput | Chat input, message box | Text input with send/attach for AI prompts | ai-agent.md |
| PromptPane | Chat panel, chat sidebar | Full chat container with messages + input | ai-agent.md |
## Toolbar
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| Toolbar | Tool palette, action bar | Floating toolbar container | toolbar.md |
| ToolbarItem | Tool button, toolbar icon | Icon button within a Toolbar | toolbar.md |
## Layout & utility
| Component | Alt names | Purpose | Guidelines |
|---|---|---|---|
| AstraLogo | Logo, brand mark | Brand mark SVG | navigation.md |
| ThemeProvider | Theme wrapper, dark mode | App root provider for theme management | ../foundations/modes.md |
## Button variant decision tree
```
┌─ "What button variant should I use?"
│
├─ Main call-to-action (one per section)?
│ └─ variant="primary"
│
├─ Supporting action alongside a primary?
│ └─ variant="neutral" ⭐ Default for secondary actions
│
└─ Subtle or low-emphasis action?
└─ variant="subtle"
```
Rules:
- Only one `primary` button per visible section
- Do not use variant names that don't exist (`"secondary"`, `"ghost"`, `"destructive"`)
- Valid variants are: `"primary"`, `"neutral"`, `"subtle"` — nothing else
## Input component selection
```
┌─ "How should the user provide input?"
│
├─ Choose from mutually exclusive options?
│ └─ RadioGroup
│
├─ Choose from predefined options (dropdown)?
│ └─ SelectField
│
├─ Boolean on/off (setting with label)?
│ └─ SwitchField
│
├─ Boolean on/off (form field)?
│ └─ Checkbox
│
├─ Freeform short text?
│ └─ InputField
│
├─ Freeform long text?
│ └─ TextareaField
│
└─ Search with animated placeholder?
└─ SearchComponent
```
## Feedback component selection
```
┌─ "How should I show information to the user?"
│
├─ Brief notification with progress?
│ └─ Toast — "Uploading...", "Changes saved"
│
├─ Status label or counter?
│ └─ Badge — "New", "Active", "3 items"
│
├─ Contextual hint on hover?
│ └─ Tooltip — icon button labels, abbreviation explanations
│
└─ Requires user decision or focused task?
└─ Modal — confirmations, export settings, forms
```
## Navigation hierarchy
```
┌─ "What navigation component should I use?"
│
├─ App-level navigation (always present)?
│ └─ SidebarNavigation + SidebarButton (PRIMARY)
│
├─ Page sub-sections (settings, detail views)?
│ └─ SecondaryNav + SecondaryNavItem (SECONDARY)
│
└─ Content switching within a section?
└─ Tabs (TERTIARY)
```
IMPORTANT: Never skip navigation levels. Every desktop page includes SidebarNavigation. Use SecondaryNav for sub-sections, not Tabs.
## Common props
Most components accept:
- `className`: String for additional CSS classes
- `disabled`: Boolean to disable the component
Form components additionally accept:
- `label`: Field label text
- `description`: Helper text below the label
- `onChange`: Simplified callback — `(value) => void`, not native event
tokens.md: design token guidelines
To create polished outputs, Figma Make needs to know how to use the tokens that specify your colors, typography, spacing, radii, etc. Like you see in the example file structure, you can actually have multiple files for your tokens. Don’t feel required to stick to just the one tokens.md file initially provided.
We commonly see tokens for colors, typography, and spacing, but you can add guidelines for any token type used by your design system.
In the file for each type of tokens, you should cover:
- An overall design philosophy of how these tokens are used.
- Descriptions of overarching groups of tokens, including their naming and usage patterns.
- Lists of specific tokens along with examples and descriptions of their proper usage.
- Higher level examples of how different tokens are used together.
Example: typography.md
# Typography Tokens
## Font families
Astra uses a single font family for all UI text:
| Family | Token | Tailwind | Usage |
|---|---|---|---|
| Instrument Sans | `font-sans` | `font-sans` | **All UI text** — body, labels, inputs |
| Instrument Sans | `font-display` | `font-display` | Titles (same family, used semantically) |
Both `font-sans` and `font-display` resolve to `'Instrument Sans', system-ui, sans-serif`. Do not use other font families directly.
## Type scale
Astra uses composite typography classes that bundle size, weight, line height, and extras together. Always use these classes — do not set font-size independently.
| Class | Size | Weight | Line Height | Usage |
|---|---|---|---|---|
| `text-title` | 24px | 600 (SemiBold) | 1.4 | Page titles, major headings |
| `text-heading` | 20px | 500 (Medium) | 1.4 | Section headings |
| `text-caption` | 20px | 600 (SemiBold) | 1.4 | Uppercase captions |
| `text-label` | 16px | 500 (Medium) | 1.4 | Form labels, card section headings, button text |
| `text-label-sm` | 14px | 500 (Medium) | 1.4 | Descriptions, helper text, secondary labels |
| `text-input` | 16px | 400 (Regular) | 1.4 | Input field values |
| `text-input-sm` | 14px | 500 (Medium) | 1.4 | Small input values, DurationBadge text |
| `text-video-title` | 12px | 400 (Regular) | normal | Metadata, timestamps, smallest text |
The dominant text sizes are 16px (`text-label`) and 14px (`text-label-sm`). Do not use arbitrary font sizes — every text element should map to a class from this scale.
## Font weights
| Tailwind | Weight | Usage |
|---|---|---|
| `font-book` | 450 | Occasional — between regular and medium |
| `font-medium` | 500 | **Default for labels and UI text** |
| `font-semibold` | 600 | Titles, section headings, strong emphasis |
Most UI text uses `font-medium` (500) via the composite type classes. Do not use weights outside this set (no 300, 700, 800, or 900).
## Decision tree
```
┌─ "What typography class should I use?"
│
├─ PAGE TITLE (top of page, one per view)?
│ └─ text-title (24px semibold)
│
├─ SECTION HEADING (within page content)?
│ └─ text-heading (20px medium)
│
├─ UPPERCASE CAPTION or label?
│ └─ text-caption (20px semibold, uppercase)
│
├─ CARD SECTION HEADING or form label?
│ └─ text-label (16px medium)
│
├─ DESCRIPTION, helper text, or secondary info?
│ └─ text-label-sm (14px medium)