- 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
One row of a property section, its fields beside a trailing action column that keeps every row's right edge aligned.
Installation#
pnpm dlx shadcn@latest add @zui/panel-rowThe CLI writes components/layout/panel-row.tsx and installs Utils.
Usage#
import { PanelRow, PanelRowAction } from '@/components/layout/panel-row';<PanelRow>
<PanelFieldGroup cols={2}>
<Field>
<FieldLabel nativeID="x">X</FieldLabel>
<Input aria-label="X" aria-labelledby="x" defaultValue="100" />
</Field>
<Field>
<FieldLabel nativeID="y">Y</FieldLabel>
<Input aria-label="Y" aria-labelledby="y" defaultValue="200" />
</Field>
</PanelFieldGroup>
<PanelRowAction>
<Button variant="ghost" size="icon" aria-label="Lock aspect ratio">
<Icon as={Lock} />
</Button>
</PanelRowAction>
</PanelRow>Compose a Panel field group for the fields. The row keeps its
action column whether a PanelRowAction is composed or not, so every row in the panel keeps the same right edge.
Composition#
PanelRow
|-- PanelFieldGroup
| `-- Field
| |-- FieldLabel
| `-- Input
`-- PanelRowAction
`-- ButtonAPI reference#
PanelRow#
Takes every prop of React Native's View. One row of a property section: everything but the action goes in a
leading column that takes the room left, and the action column after it is at least one default icon button
(size="icon") wide. The fields and the action line up at their bottom edge. It finds the action by its element,
so pass PanelRowAction itself, not inside a component of your own.
PanelRowAction#
Takes every prop of React Native's View. The trailing action of a PanelRow, such as an aspect-lock toggle or a
reset button, centred in its column.
Differences from the web#
- The web row is a CSS grid whose template a
grid-cols-*class or the--panel-row-columnsvariable can replace; React Native has no grid, so the two columns are fixed.