DocsComponentsTemplatesThemesGitHub

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.json

Guidelines

  • Default 1200px; use 720 for reading pages and forms.

Props

PropTypeRequired
widthnumber | stringNo
askeyof React.JSX.IntrinsicElementsNo
classNamestringNo
styleReact.CSSPropertiesNo
childrenReact.ReactNodeNo

Edit this example on GitHub