Locked Video

Please log in or buy the course to watch

Buy Now

Introduction to Slot Recipes

When it comes to creating a recipe for a component with multiple parts, it can get quite tedious. Slot recipes come in handy to provide an API that styles the different parts of a component.

A slot recipe consists of these properties:

  • slots: An array of component parts to style
  • base: The base styles per slot
  • variants: The different visual styles for each slot
  • defaultVariants: The default variant for the component
  • compoundVariants: The compound variant combination and style overrides for each slot.