- Label
- Icon label
- Field
- Form
- Frontmatter form
- Questionnaire
- Input
- Input group
- Input OTP
- Password input
- Password strength
- Code input
- Number field
- Tag input
- Textarea
- Checkbox
- Radio group
- Language toggle group
- Emoji appearance toggle group
- Emoji picker
- Avatar picker
- AI provider picker
- Select
- Native select
- Combobox
- Language combobox
- Slider
- Calendar
- Switch
- Alert
- Avatar
- Badge
- Card
- AI provider card
- Model info card
- Model list
- Empty
- Item
- Tree item
- File tree
- Icon media
- File type icon
- Font preview
- Image preview
- Kbd
- Table
- Data table
- Data table column header
- Chart
- Code Block
- Code card
- Markdown view
- Attachment
- Bubble
- Marker
- Message
- Chat message
- Chat suggestion item
- Message scroller
- Trace
- Progress
- Spinner
- Sonner
- Toast
- Unsaved changes toolbar
- Unsaved indicator
- Status indicator
- Permission card
- Separator
- Skeleton
- Animated grid pattern
- Meteors
The centered, max-width content column of a full-width surface, sized from a named max-width scale.
Installation#
pnpm dlx shadcn@latest add @zui/page-containerThe CLI writes components/layout/page-container.tsx, installs Utils, and adds class-variance-authority.
Usage#
import { PageContainer } from '@/components/layout/page-container';<ScrollView>
<PageContainer size="lg" className="px-6 py-6">
...
</PageContainer>
</ScrollView>Pick the width with size; className carries the surface's own padding and vertical rhythm. It does not scroll,
as the web one does not, so put it inside the screen's ScrollView. It centres only the column's width, not its
content on both axes; for that, use Center instead.
API reference#
PageContainer#
Takes every prop of React Native's View, plus:
| Prop | Type | Default |
|---|---|---|
size | 'sm' | 'md' | 'lg' | 'full' | 'md' |
The centred, max-width content column of a full-width surface, so content does not stretch edge to edge on a
tablet held sideways; on a phone held upright every size is as wide as the screen. size picks the width from the
max-width scale.
pageContainerVariants#
The size variant: sm max-w-3xl, md (the default) max-w-5xl, lg max-w-7xl, full max-w-none.