Layout primitives for Next.js and React apps - Page wrapper and Card component
npm install @philiprehberger/next-layout-componentsLayout primitives for Next.js and React apps
npm install @philiprehberger/next-layout-components clsx
import { Page, Card } from '@philiprehberger/next-layout-components';
export default function HomePage() {
return (
<Page maxWidth="xl">
<Card title="Welcome" padding="lg" hoverable>
<p>Card content goes here</p>
</Card>
</Page>
);
}
PagePage wrapper with responsive padding and configurable max width.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | -- | Page content |
maxWidth | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'xl' | Max width constraint |
className | string | -- | Additional CSS classes |
CardCard container with optional title, configurable padding, and hover effect.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | -- | Card content |
title | string | -- | Optional card heading |
padding | 'none' | 'sm' | 'md' | 'lg' | 'md' | Padding size |
hoverable | boolean | false | Enable hover effect |
className | string | -- | Additional CSS classes |
contentWrapperClassName | string | -- | CSS class for the content wrapper |
npm install
npm run build
npm test
If you find this project useful: