The component must be named using the PascalCase convention.
Each component should adhere to the following folder file structure:
Notes:
pnpm generate-component script (see page Creating Component for more details).src directory.Button.tsx)Button.types.ts)Button.meta.tsx) for automatic TestKit, SSR, and accessibility testingindex.ts filedocs folder with the component's Storybook examplescomponents folder in the main component directory.
index.ts file.test folder should be created in their respective subcomponent folders.hooks folder for custom hooks.Button.constants.tsx) for component-specific constants.Button.context.ts) for managing component context.By following these guidelines, we ensure a structured and organized approach to component development, facilitating scalability, maintainability, and ease of collaboration.
Component implementation. It can either be an atom or a composition of other components.
Component stylesheets powered by Stylable. See documentation to learn how to use it: Stylable.
Every component exposes a public driver (testkit) to interact with it in tests (ComponentName.spec.tsx).
Visual tests for component styles and variations.
An internal metadata file for automatic visual, SSR, a11y and testkit testing.
Unit tests of component behavior and methods.
Visual tests of component styles and variations after interactions.
Entry file for documentation. It uses the .story convention to apply the automated documentation tool.
Last updated: 26 October 2026