pitsi/ui
HomeDocsComponentsAnimationsBlocksTemplates
1
1
Sections
  • Get Started
  • Components
  • Animations
  • MCP Server
  • Forms
  • Changelog
Get Started
  • Installation
  • CLI
  • llms.txt
Components
  • Accordion
  • Alert Dialog
  • Alert
  • Aspect Ratio
  • Avatar
  • Badge
  • Breadcrumb
  • Button Group
  • Button
  • Calendar
  • Card
  • Carousel
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • Container
  • Context Menu
  • Data Table
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Flex
  • Form
  • Grid
  • Hover Card
  • Input Group
  • Input OTP
  • Input
  • Item
  • Kbd
  • Label
  • Menubar
  • Native Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Resizable
  • Responsive
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spacer
  • Spinner
  • Squircle
  • Switch
  • Table
  • Tabs
  • Textarea
  • Theme Toggle
  • Toggle Group
  • Toggle
  • Tooltip
  • Typography
  • Unicorn Wrapper
Animations
  • Background Image Parallax
  • Blend Mode Cursor
  • Card Swipe Carousel
  • Cards Parallax
  • Cursor Hover Mask
  • Floating Image Gallery
  • Mouse Hover Gallery
  • Nav Menu
  • Parallax Scroll
  • Perspective Carousel
  • Perspective Section Transition
  • Scroll Expand
  • Scroll Fade
  • Scroll Scale
  • Slide Down
  • Slide Up
  • Smooth Parallax Scroll
  • Smooth Scroll
  • Sticky Footer
  • Text Along Path
  • Text Gradient Opacity
  • Text Parallax
  • Transforms 3d
  • Zoom Parallax
General

Resources, guides, and helpful links.

Documentation
Introduction
Installation
CLI
llms.txt
Next.js
Vite
Laravel
React Router
Pages
Home
Docs
Components
Animations
Blocks
Templates
Templates
Application Shell
Calendar
Dashboard
Forms
Modalbox
Profile Headers
Section Headers
Table Header
Connect
GitHub
Twitter
Get Started
Changelog
Legal
Privacy
Terms
Blocks

Larger composed sections for building pages.

Application Shell
Calendar
Dashboard
Forms
Modalbox
Profile Headers
Section Headers
Table Header
Category Filter
Comment List
Incentives
Order Confirmation
Order History
Order Summaries
Order Tracking
Product List
Product Overview
Product Review
Refund Form
Refund Overview
Refund Status
Shopping Cart
404 Page
About Us Page
Blog Details
Career Pages
Coming Soon Page
Contactus Page
Legal Pages
Login Page
Maintenance Page
Otp
Pricing Page
About Us Section
Blogs News
Clients
Contact Form
Cta
Faq
Features
Footer
Gallery
Hero Section
How It Works
Integration
Portfolio
Pricing Plans
Stats
Team
Testimonial
Components

Copy and paste UI components into your apps.

Accordion
Alert Dialog
Alert
Aspect Ratio
Avatar
Badge
Breadcrumb
Button Group
Button
Calendar
Card
Carousel
Checkbox
Collapsible
Combobox
Command
Container
Context Menu
Data Table
Date Picker
Dialog
Drawer
Dropdown Menu
Empty
Field
Flex
Form
Grid
Hover Card
Input Group
Input OTP
Input
Item
Kbd
Label
Menubar
Native Select
Navigation Menu
Pagination
Popover
Progress
Radio Group
Resizable
Responsive
Scroll Area
Segmented Control
Select
Separator
Sheet
Sidebar
Skeleton
Slider
Sonner
Spacer
Spinner
Squircle
Switch
Table
Tabs
Textarea
Theme Toggle
Toggle Group
Toggle
Tooltip
Typography
Unicorn Wrapper
Animations

Beautiful animations and effects for your UI.

Background Image Parallax
Blend Mode Cursor
Card Swipe Carousel
Cards Parallax
Cursor Hover Mask
Floating Image Gallery
Mouse Hover Gallery
Nav Menu
Parallax Scroll
Perspective Carousel
Perspective Section Transition
Scroll Expand
Scroll Fade
Scroll Scale
Slide Down
Slide Up
Smooth Parallax Scroll
Smooth Scroll
Sticky Footer
Text Along Path
Text Gradient Opacity
Text Parallax
Transforms 3d
Zoom Parallax
Sign In

Container

PreviousNext

A layout component with gutter and padding management for responsive content centering.

Powered by
shadcn/ui

Installation

pnpm dlx pitsi@latest add container

Usage

CommandContext Menu

On This Page

InstallationUsageComponentsContainerEscapeContainerSpaceLeftSpaceRightPropsContainerEscapeContainerSpaceLeft / SpaceRight
import { Container } from "@/components/ui/container"
<Container>
  <h1>Page Content</h1>
  <p>
    Your content here will be automatically centered with responsive gutters.
  </p>
</Container>

Components

The Container component exports several utilities:

Container

The main container component with responsive gutters and centered content.

<Container>
  <div>Centered content with gutters</div>
</Container>

EscapeContainer

Break out of the container to span the full viewport width.

<Container>
  <div>Normal content</div>
  <EscapeContainer>
    <div>Full-width content</div>
  </EscapeContainer>
</Container>

SpaceLeft

Add left spacing that matches the container's gutter.

<SpaceLeft>
  <div>Content with left spacing</div>
</SpaceLeft>

SpaceRight

Add right spacing that matches the container's gutter.

<SpaceRight>
  <div>Content with right spacing</div>
</SpaceRight>

Props

Container

PropTypeDefaultDescription
childrenReact.ReactNode-The content to be contained
gutterWidthClassNamestring"[--gutter-width:10svw]"Custom gutter width CSS variable
paddingMobileClassNamestring"[--padding-mobile:1rem]"Custom mobile padding CSS variable
classNamestring-Additional classes for the wrapper
classNamesobject-Classes for specific container parts
classNames.wrapperstring-Classes for the outer wrapper
classNames.gridstring-Classes for the grid container
classNames.leftBarstring-Classes for the left gutter
classNames.rightBarstring-Classes for the right gutter
classNames.contentstring-Classes for the content area

EscapeContainer

PropTypeDefaultDescription
childrenReact.ReactNode-The content to span full width
classNamestring-Additional classes

SpaceLeft / SpaceRight

PropTypeDefaultDescription
childrenReact.ReactNode-The content to add spacing to
classNamestring-Additional classes
gutterWidthClassNamestring"[--gutter-width:10svw]"Custom gutter width CSS variable
paddingMobileClassNamestring"[--padding-mobile:1rem]"Custom mobile padding CSS variable

Container Component

This content is automatically centered with responsive max-width and padding.

import { Container } from "@/components/ui/container"

export function ContainerDemo() {
  return (
    <div className="w-full">
      <Container className="py-8">
        <div className="bg-card border-border text-card-foreground space-y-4 rounded-lg border p-8 shadow-sm">
          <h2 className="text-2xl font-bold">Container Component</h2>
          <p className="text-muted-foreground">
            This content is automatically centered with responsive max-width and
            padding.
          </p>
          <div className="border-border bg-muted/50 mt-4 flex items-center gap-2 rounded-md border p-4">
            <div className="bg-muted size-10 rounded-full" />
            <div className="flex-1">
              <div className="bg-muted mb-2 h-3 w-3/4 rounded" />
              <div className="bg-muted/70 h-2 w-1/2 rounded" />
            </div>
          </div>
        </div>
      </Container>
    </div>
  )
}