Reusable components for consistent UI patterns across the application
This document provides comprehensive documentation for all common/reusable components.
Responsive container component with preset sizes.
Props:
size: "sm" | "md" | "lg" | "xl" | "full" (default: "xl")className: Additional CSS classesUsage:
import { Container } from "@/components/common/container"
;<Container size="lg">Content here</Container>
Page section component with consistent spacing.
Props:
spacing: "sm" | "md" | "lg" (default: "md")containerSize: Optional container sizeid: Section ID for anchor navigationUsage:
import { Section } from "@/components/common/section"
;<Section spacing="lg" id="features">
Content here
</Section>
Consistent page header with title, description, and actions.
Props:
title: string (required)description: stringactions: ReactNodeUsage:
import { PageHeader } from "@/components/common/page-header"
;<PageHeader
title="Dashboard"
description="View your account"
actions={<Button>Action</Button>}
/>
Component for displaying empty states.
Props:
title: string (required)description: stringaction: { label: string; onClick: () => void }Usage:
import { EmptyState } from "@/components/common/empty-state"
;<EmptyState
title="No items"
description="Create your first item"
action={{ label: "Create", onClick: handleCreate }}
/>
Wrapper for consistent icon sizing. Works with Huge Icons and Hero Icons.
Props:
icon: ComponentType | IconSvgObject (required)size: "xs" | "sm" | "md" | "lg" | "xl" | number (default: "md")className: Additional CSS classesUsage:
import { Home01Icon } from "@/lib/icons"
import { IconWrapper } from "@/components/common/icon-wrapper"
;<IconWrapper icon={Home01Icon} size="lg" className="text-primary" />
View documentation →
View documentation →
View documentation →
View documentation →
View documentation →
View documentation →
View documentation →
View documentation →
View documentation →
View documentation →
size: "sm" | "md" | "lg" | "xl" | "full" (default: "xl")className: Additional CSS classesimport { Container } from "@/components/common/container";
<Container size="lg">
Content here
</Container>spacing: "sm" | "md" | "lg" (default: "md")containerSize: Optional container sizeid: Section ID for anchor navigationimport { Section } from "@/components/common/section";
<Section spacing="lg" id="features">
Content here
</Section>title: string (required)description: stringactions: ReactNodeThis is an example page header
title: string (required)description: stringaction: { label: string; onClick: () => void }Get started by creating your first item
icon: ComponentType | IconSvgObject (required)size: "xs" | "sm" | "md" | "lg" | "xl" | numberclassName: Additional CSS classessize: "sm" | "md" | "lg" (default: "md")