Skip to content

Want to skip the docs? Check out pandamastery.com - the best way to learn Panda CSS

Styled System

recipes/

The recipes/ folder — generated modules for every config recipe in your theme.

Folder: styled-system/recipes/
Import: import { button } from '../styled-system/recipes'

Codegen writes one module per config recipe (for example recipes/button.ts) plus recipes/index.ts. Each export is a function: pass variants, get a class name (or a slot map for slot recipes).

import { button } from '../styled-system/recipes'
 
button({ size: 'sm', visual: 'solid' })

These come from theme.recipes / theme.slotRecipes in config (defineRecipe / defineSlotRecipe), not from colocated cva / sva in your components.

Types

Variant types ship next to the recipe:

import { button, type ButtonVariantProps } from '../styled-system/recipes'

Exact type names follow the theme key (buttonButtonVariant / ButtonVariantProps).

Atomic vs config

NeedUse
Variants local to one componentcva / sva in css/
Shared design-system recipeConfig recipe → this recipes/ folder

Full guides

See also

Edit this page on GitHubView as markdown
Last updated on