Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Blocks
  2. Crud Page
  3. API and Development

Crud Page

API and Development

View Source
Submit Issue

CrudPage and its slot components are exported from @prepared911/ui-blocks. The root partitions direct children into header, alert, toolbar, and body regions so the visual order stays header → alert → toolbar → body even when JSX order differs.

CrudPageHeader delegates to PageHeader with actions omitted—put primary CTAs on CrudPageToolbar. CrudPageToolbar is DataTableToolbar with a layout class. When any child is CrudPageBody, the default inner body wrapper is skipped so you do not double-wrap flex containers.

CrudPage props

NameTypeDefaultDescription
childrenReactNoderequiredSlot children and/or body content.
variantCrudPageVariantDefaultDefault or Card surface.
gapGap2Vertical gap between major regions (ignored when an explicit CrudPageBody supplies its own gap).
paddingSpacing—Optional padding on the root.
classNamestring—Root class name.

CrudPageHeader props

Same as PageHeaderProps from @prepared911/ui-blocks except actions is omitted. See Page header API.

CrudPageToolbar props

Forwards DataTableToolbarProps from @prepared911/ui-data-table and React.forwardRef FilterRef. See Data table API.

CrudPageBody props

NameTypeDefaultDescription
childrenReactNoderequiredBody content (table, split panes, etc.).
flexDirectionFlexDirectionColumnLayout direction for the body region.
gapGap—Gap between body children.
classNamestring—Body wrapper class name.

CrudPageAlert props

NameTypeDefaultDescription
childrenReactNoderequiredTypically Callout or Banner from @prepared911/ui-core.
classNamestring—Wrapper class name.

CrudPageVariant

ValueUse when
CrudPageVariant.DefaultThe page is the main route surface and inherits app chrome.
CrudPageVariant.CardThe layout sits inside another surface (modal, drawer, dashboard tile) and should read as a card.

Import

Previews use a bounded Box height so flex layout matches real routes.

Header and body

Toolbar with filter and primary CTA

Breadcrumb and table

Count and toolbar CTA

Read-only header

Read-only with tooltip details

Alert slot with Callout

Empty table state

Manual pagination

Card variant

Previous

Crud Page / Usage

Next

Crud Page / Accessibility

On this page

CrudPage props
CrudPageHeader props
CrudPageToolbar props
CrudPageBody props
CrudPageAlert props
CrudPageVariant
Import
Header and body
Toolbar with filter and primary CTA
Breadcrumb and table
Count and toolbar CTA
Read-only header
Read-only with tooltip details
Alert slot with Callout
Empty table state
Manual pagination
Card variant