All classNames have been reorganized to be descriptive, semantic, and easy to follow.
[component]-[element]-[modifier]
Examples:
navbar-logo-react→ Navbar component, logo element, React variantsidebar-menu-item→ Sidebar component, menu item elementdashboard-greeting-title→ Dashboard component, greeting element, title variant
<BootstrapNavbar className="navbar-main">
<Container className="navbar-container"><BootstrapNavbar.Brand className="navbar-brand-wrapper">
<img className="navbar-logo-vite" />
<img className="navbar-logo-react" /> {/* ← Has animation */}
<span className="navbar-title"><Nav className="navbar-links">
<Nav.Link className="navbar-link"><div className="navbar-actions">
<div className="navbar-search-wrapper">
<input className="navbar-search-input" />
<Dropdown.Menu className="navbar-search-dropdown">
<Dropdown.Item className="navbar-search-item" />
<Dropdown.Item className="navbar-search-empty"> {/* When no results */}<Button className="navbar-logout-btn"><div className="sidebar sidebar-container"><h6 className="sidebar-title"><Nav className="sidebar-nav">
<Nav.Link className="sidebar-menu-item">CSS Targets:
.sidebar-menu-item:hover→ Hover state.sidebar-menu-item:focus→ Focus state
<div className="dashboard-main main-content"> {/* main-content = legacy support */}<Card className="dashboard-card"><div className="dashboard-greeting">
<h3 className="dashboard-greeting-title">
<p className="dashboard-greeting-subtitle"><Row className="overview-cards-empty">
<Col className="overview-cards-empty-col">
<Card className="overview-cards-empty-card">
<Card.Body className="overview-cards-empty-body">
<Card.Text className="overview-cards-empty-text"><Row className="overview-cards-row">
<Col className="overview-card-col">
<Card className="overview-card"> {/* Also has: border-{variant} */}
<Card.Body className="overview-card-body">
<Card.Title className="overview-card-title">
<Card.Text className="overview-card-value"> {/* Also has: text-{variant} */}Dynamic Classes:
border-primary,border-success,border-danger→ Card borderstext-primary,text-success,text-danger→ Value colors
<Row className="charts-row"><Col className="chart-col chart-col-line">
<Card className="chart-card chart-card-line">
<h5 className="chart-title chart-title-line">
<ResponsiveContainer className="chart-container chart-container-line">
<LineChart className="chart-linechart">
<CartesianGrid className="chart-grid" />
<XAxis className="chart-xaxis" />
<YAxis className="chart-yaxis" />
<Tooltip className="chart-tooltip" />
<Legend className="chart-legend" />
<Line className="chart-line-revenue" /> {/* revenue, profit, expenses */}
<Line className="chart-line-profit" />
<Line className="chart-line-expenses" /><Col className="chart-col chart-col-pie">
<Card className="chart-card chart-card-pie">
<h5 className="chart-title chart-title-pie">
<ResponsiveContainer className="chart-container chart-container-pie">
<PieChart className="chart-piechart">
<Pie className="chart-pie">
<Cell className="chart-pie-cell chart-pie-cell-0" /> {/* Index-based */}
<Cell className="chart-pie-cell chart-pie-cell-1" />
<Cell className="chart-pie-cell chart-pie-cell-2" /><div className="app-layout"> {/* Wraps Sidebar + Dashboard */}<ToastContainer className="app-toast-container">
<Toast className="app-toast">
<Toast.Header className="app-toast-header">
<strong className="app-toast-title">
<Toast.Body className="app-toast-body">#root /* Root container */.navbar-logo-react /* React logo with spin animation */
.navbar-search-wrapper /* Search input container */.sidebar /* Sidebar container */
.sidebar-title /* "Menu" title */
.sidebar-menu-item /* Individual menu links */.dashboard-main /* Main content area */
.dashboard-card /* Card wrapper */
.dashboard-greeting-title /* "Hello, Andrew" */
.dashboard-greeting-subtitle /* Description text */Need to style...?
| Element | ClassName | File |
|---|---|---|
| Navbar background | .navbar-main |
Navbar.jsx |
| Logo animation | .navbar-logo-react |
Navbar.css |
| Search box | .navbar-search-input |
Navbar.jsx |
| Sidebar background | .sidebar |
Sidebar.css |
| Menu items | .sidebar-menu-item |
Sidebar.css |
| Main content area | .dashboard-main |
Dashboard.css |
| Greeting text | .dashboard-greeting-title |
Dashboard.css |
| Metric cards | .overview-card |
OverviewCards.jsx |
| Card title | .overview-card-title |
OverviewCards.jsx |
| Card value | .overview-card-value |
OverviewCards.jsx |
| Chart containers | .chart-card |
Charts.jsx |
| Line chart | .chart-card-line |
Charts.jsx |
| Pie chart | .chart-card-pie |
Charts.jsx |
| Toast notifications | .app-toast |
App.jsx |
/* Style only the line chart */
.chart-card-line {
border: 2px solid blue;
}
/* Style only the pie chart */
.chart-card-pie {
background: linear-gradient(to bottom, #fff, #f8f9fa);
}/* Style the revenue line */
.chart-line-revenue {
stroke-width: 3px;
}{/* In code, Bootstrap classes work too */}
<Card className="overview-card border-primary"> {/* Blue border */}
<Card className="overview-card border-success"> {/* Green border */}
<Card className="overview-card border-danger"> {/* Red border */}/* Custom hover for sidebar items */
.sidebar-menu-item:hover {
background-color: #007bff;
transform: translateX(5px);
}App
├── app-layout
│ ├── Sidebar
│ │ ├── sidebar
│ │ ├── sidebar-title
│ │ └── sidebar-menu-item
│ │
│ └── Dashboard
│ ├── dashboard-main
│ ├── dashboard-card
│ ├── dashboard-greeting
│ │ ├── dashboard-greeting-title
│ │ └── dashboard-greeting-subtitle
│ │
│ ├── OverviewCards
│ │ ├── overview-cards-row
│ │ ├── overview-card-col
│ │ └── overview-card
│ │ ├── overview-card-body
│ │ ├── overview-card-title
│ │ └── overview-card-value
│ │
│ └── Charts
│ ├── charts-row
│ ├── chart-col (line/pie)
│ └── chart-card (line/pie)
│ ├── chart-title
│ ├── chart-container
│ └── chart-linechart / chart-piechart
│
├── Navbar
│ ├── navbar-main
│ ├── navbar-brand-wrapper
│ │ ├── navbar-logo-vite
│ │ ├── navbar-logo-react
│ │ └── navbar-title
│ ├── navbar-links
│ │ └── navbar-link
│ └── navbar-actions
│ ├── navbar-search-wrapper
│ │ ├── navbar-search-input
│ │ └── navbar-search-dropdown
│ │ └── navbar-search-item
│ └── navbar-logout-btn
│
└── app-toast-container
└── app-toast
├── app-toast-header
│ └── app-toast-title
└── app-toast-body
- Self-Documenting:
navbar-search-inputis clearer thanform-control - Component Scoped: Know exactly which component a class belongs to
- Easy to Find: Search for "navbar" to find all navbar-related classes
- Hierarchical: Parent-child relationships are obvious
- No Conflicts: Component prefixes prevent naming collisions
- Maintainable: Easy to add new variants (e.g.,
chart-col-bar)
- Add custom styles to any className in the corresponding CSS file
- Search by component name to find all related classes
- Use descriptive names when adding new components
- Keep the pattern consistent:
[component]-[element]-[modifier]
Happy Styling! 🎨