Container
Centered page container with max width and responsive side padding.
Code
import * as React from 'react';
import { Container } from '@fruit-labs/design';
export default function Demo() {
return (
<Container width={480}>
<div
style={{
height: 40,
borderRadius: 12,
background: 'var(--fill)',
}}
/>
</Container>
);
}Install
From npm:
npm install @fruit-labs/design
import { Container } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/container.jsonGuidelines
- Default 1200px; use 720 for reading pages and forms.
Props
| Prop | Type | Required |
|---|---|---|
width | number | string | No |
as | keyof React.JSX.IntrinsicElements | No |
className | string | No |
style | React.CSSProperties | No |
children | React.ReactNode | No |