Skip to content

Naming Conventions

Component Naming

All UI components follow the pattern Ui + PascalCase:

  • UiIcon, UiAvatar, UiAccordion, UiHeader

The Ui prefix clearly distinguishes design system components from other application components.

Folder Structure

Each component lives in its own folder, named after the component, containing all related files:

UiMyComponent/
├── UiMyComponent.tsx              # Component
├── UiMyComponent.stories.tsx      # Storybook stories
├── UiMyComponent.css              # CSS (only if needed)
└── UiMyComponent.animation.ts     # Animation logic (only if needed)

Sub-components

When a component has internal sub-components, they live in sub-folders within the parent component folder:

UiMyComponent/
├── UiMyComponent.tsx
├── UiMyComponent.stories.tsx
├── UiMyComponentPartA/
│   └── UiMyComponentPartA.tsx
├── UiMyComponentPartB/
│   └── UiMyComponentPartB.tsx
└── UiMyComponentPartC/
    └── UiMyComponentPartC.tsx

File Naming Summary

File typePatternExample
ComponentUiComponentName.tsxUiMyComponent.tsx
StoriesUiComponentName.stories.tsxUiMyComponent.stories.tsx
CSSUiComponentName.cssUiMyComponent.css
AnimationUiComponentName.animation.tsUiMyComponent.animation.ts