Locked Video

Please log in or buy the course to watch

Buy Now

Just in Time Styles

Config recipes generate styles just in time, meaning only the variants used in the application are included in the stylesheet.

This approach ensures a more efficient and lean stylesheet, reducing load times and improving performance.

Steps to Generate Just In Time Styles

  • Use specific variants of the alert recipe (e.g., status: info and kind: subtle) within your application.

  • Run the CSS generation command

pnpm panda cssgen src/App.tsx --minimal
  • Check the stylesheet (styles.css) to verify that only the base styles and the used variants (info and subtle) are present.