Customization
Last updated on 2026-03-20
The E-commerce Starter Kit is designed to be customized for your store. All components use design tokens and Tailwind CSS utilities, making brand adaptation straightforward.
Changing Colors
Update CSS custom properties in app/globals.css:
:root {
--primary: oklch(0.55 0.2 250);
--primary-foreground: oklch(0.98 0 0);
--accent: oklch(0.6 0.15 150);
--accent-foreground: oklch(0.98 0 0);
}
All components automatically inherit the new colors — buttons, badges, links, charts, and focus rings.
Changing Typography
Configure fonts in app/layout.tsx:
import { Inter, DM_Sans, JetBrains_Mono } from "next/font/google";
const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
const dmSans = DM_Sans({ subsets: ["latin"], variable: "--font-heading" });
Swap these for any Google Font or local font files. The CSS variables --font-sans, --font-heading, and --font-mono control body text, headings, and code respectively.
Replacing Seed Data
All mock data lives in data/seed.ts. Replace it with your data source:
Static data (SSG/ISR)
// In your page
import { getProducts } from "@/lib/api"
export default async function ProductsPage() {
const products = await getProducts()
return <ProductGrid products={products} />
}
CMS integration
Replace seed data imports with your CMS client:
import { sanityClient } from "@/lib/sanity"
const products = await sanityClient.fetch(`*[_type == "product"]`)
Database
import { db } from "@/lib/db"
const products = await db.product.findMany()
Extending Components
Use the cn() utility to add custom classes:
import { Button } from "@/components/ui/button"
<Button className="rounded-full shadow-lg" size="lg">
Add to Cart
</Button>
Adding Component Variants
Components use class-variance-authority:
const buttonVariants = cva("...", {
variants: {
variant: {
default: "...",
brand: "bg-brand-500 text-white hover:bg-brand-600",
},
},
})
Customizing the Storefront Header
Edit components/layout/store-header.tsx to:
- Add or remove navigation links
- Change the logo
- Add a currency/language selector
- Modify the cart icon badge
Customizing the Checkout Flow
The checkout uses separate routes for each step. To add or remove steps:
- Add/remove page files in
app/(storefront)/checkout/ - Update the
CheckoutStepscomponent incomponents/layout/checkout-steps.tsx - Adjust navigation between steps
Adding New Product Fields
- Update the
Productinterface intypes/index.ts - Add the field to products in
data/seed.ts - Display it in
ProductCardorProductTabs
Adding New Admin Pages
Follow the existing pattern:
- Create a new page in
app/(admin)/admin/your-page/page.tsx - Add a navigation link in
components/layout/admin-sidebar.tsx - Create any needed composites in
components/admin/
Removing Unused Features
Delete directories you don't need:
- Don't need compare? Delete
app/(storefront)/compare/andcomponents/storefront/comparison-table.tsx - Don't need wishlist? Delete
app/(storefront)/wishlist/ - Don't need admin analytics? Delete
app/(admin)/admin/analytics/ - Run
pnpm buildto verify no broken imports
Using shadcn/ui CLI
Add new components alongside the kit:
npx shadcn@latest add <component-name>
Components install to components/ui/ and integrate seamlessly with the existing design tokens.