name component-naming description Enforces consistent React component naming conventions across the portfolio codebase. Use when creating, reviewing, or refactoring components.
Component Naming Conventions
Use this guide when creating or modifying React components to ensure consistent naming across the portfolio.
Naming Rules
1. PascalCase for Components
All React components use PascalCase:
export const FeaturedPost = ( ) => {};
export const TagFilter = ( ) => {};
export const featuredPost = ( ) => {};
export const featured_post = ( ) => {};
2. Domain + Role Pattern
Combine domain context with component role for clarity:
export const FeaturedPost = ( ) => {};
export const TagFilter = ( ) => {};
export const ReadingProgress = ( ) => {};
export const MetricCard = ( ) => {};
export const HeroSection = ( ) => {};
export const Card = ( ) => {};
export const Filter = ( ) => {};
export const Section = ( ) => {};
3. Compound Components for Subparts
Use dot notation for related subcomponents:
export const PostCard = ( ) => {};
PostCard .Image = () => {};
PostCard .Title = () => {};
PostCard .Meta = () => {};
<PostCard >
<PostCard.Image src ={...} />
<PostCard.Title > ...</PostCard.Title >
<PostCard.Meta date ={...} />
</PostCard >
export const PostCardImage = ( ) => {};
export const PostCardTitle = ( ) => {};
export const PostCardMeta = ( ) => {};
4. Avoid Problematic Suffixes
Never use these suffixes:
export const CardContainer = ( ) => {};
export const PostWrapper = ( ) => {};
export const DataComponent = ( ) => {};
export const ListElement = ( ) => {};
export const MetricCard = ( ) => {};
export const PostList = ( ) => {};
export const TagBadge = ( ) => {};
5. Avoid Layout/Styling Descriptions
Names should describe purpose, not appearance:
export const LeftSidebar = ( ) => {};
export const BigHeader = ( ) => {};
export const RedButton = ( ) => {};
export const TwoColumnGrid = ( ) => {};
export const NavigationSidebar = ( ) => {};
export const PageHeader = ( ) => {};
export const DangerButton = ( ) => {};
export const BentoGrid = ( ) => {};
File Naming Convention
Files use kebab-case matching the component name:
Component File Name FeaturedPostfeatured-post.tsxTagFiltertag-filter.tsxReadingProgressreading-progress.tsxMetricCardmetric-card.tsxHeroSectionhero-section.tsx
Component Location
Location Purpose src/components/Reusable components src/components/auth/Authentication components src/app/components/App-level shared components src/app/(main)/about/components/About page components src/app/(main)/blog/components/Blog page components src/app/(main)/dashboard/components/Dashboard page components src/app/studio/media/components/Studio media components src/app/studio/posts/components/Studio posts components src/app/studio/series/components/Studio series components
Validation Checklist
When reviewing component names:
Uses PascalCase
Has clear domain context (not just "Card", "List", "Item")
Has clear role (Chart, Card, List, Section, Filter, etc.)
No -Container, -Wrapper, -Component suffixes
No layout/styling descriptions (Left, Big, Red, TwoColumn)
File name matches component in kebab-case
Related subcomponents use compound pattern
Examples for Blog Redesign
Good patterns:
Component Domain Role FeaturedPostFeatured Post TagFilterTag Filter ReadingProgressReading Progress PostGridPost Grid AuthorCardAuthor Card BentoGridBento Grid HeroSectionHero Section LatestPostsLatest Posts SkillsGridSkills Grid ContactCtaContact Cta
Anti-patterns to avoid:
Generic names: Card, Grid, List, Section
Layout names: LeftPanel, MainContent, TopSection
Suffix pollution: CardContainer, ListWrapper, PostComponent
Related Files
.claude/skills/design-language-system/SKILL.md - Design system guidelines
src/components/ - Blog components