or
You'll be prompted for a component name (make sure to use PascalCase) and an optional description.
The generator will automatically:
Additionally, the generator will create a sample .story.js file. You can find more about using story.js here.
stories/index.js as needed. The order of require statements in that file will reflect in the rendered Storybook sidebar.| Prop | Rule | Description |
|---|---|---|
| dataHook | Required | Every component should accept a dataHook property, which is applied as a data-hook attribute on the component's root element. This attribute is used as a selector in tests. |
| className | Required | The convention for styling the component's root element is to expose a className property. NOTE: This prop is only used internally by WDS. |
| Prop | Rule | Description |
|---|---|---|
| initialPropName | Convention | Props that set an initial value to an identical uncontrolled state should be named with an initial prefix. |
| xxxProps | Convention | If the component is wrapping another component (or native DOM element) and its props are needed, pass them using the convention xxxProps. For example: inputProps, tooltipProps, etc. |
We use Stylable. Check the documentation to learn how to use it effectively.
Text or Heading components.Typography.st.css file directly./** */ comment above their TypeScript definitions in the *.types.ts file. AutoDocs will utilize this information.Last updated: 26 October 2026