File Naming Conventions

Published Updated
Standard naming conventions for React files, custom hooks, typings, and folders.

Consistent naming rules ensure the project remains organized and allows code generators to import components and types predictably without directory-scanning overhead.

  • Components: PascalCase for files and exports (e.g. OptionSwatch.tsx exporting OptionSwatch). One component per file.
  • Hooks: camelCase starting with 'use' (e.g. useOptionGroup.ts exporting useOptionGroup).
  • Types: kebab-case with .types.ts suffix (e.g. option-schema.types.ts).
  • Feature Folders: lowercase singular (e.g. configurator, checkout).
  • Asset Styles: lowercase (e.g. index.css).