Skip to content
Redpanda UI
Esc
↑↓navigate↵open⌘Jpreview
Made by malinskibeniamin
Edit on GitHub

List Layout

A composable, responsive layout component for list views with header, filters, content, and footer sections.

Installation

bash
npx shadcn@latest add @redpanda/list-layout
bash
pnpm dlx shadcn@latest add @redpanda/list-layout
bash
yarn dlx shadcn@latest add @redpanda/list-layout
bash
bunx shadcn@latest add @redpanda/list-layout
bash
nubx shadcn@latest add @redpanda/list-layout
bash
aube dlx shadcn@latest add @redpanda/list-layout

When to use

The List Layout component provides a structured layout system for list views, dashboards, and data management interfaces. Use this decision tree to determine when it’s appropriate:

Usage

tsx
import {  ListLayout,  ListLayoutHeader,  ListLayoutNavigation,  ListLayoutFilters,  ListLayoutContent,  ListLayoutFooter,} from '@/components/ui/list-layout';
tsx
<ListLayout>  <ListLayoutHeader    title="Resource Name"    description="Description of the resource or page"    actions={<Button>Action</Button>}  />  <ListLayoutNavigation>    <Tabs defaultValue="tab1">      <TabsList>        <TabsTrigger value="tab1">Tab 1</TabsTrigger>        <TabsTrigger value="tab2">Tab 2</TabsTrigger>      </TabsList>    </Tabs>  </ListLayoutNavigation>  <ListLayoutFilters actions={<Button>Create</Button>}>    <Input placeholder="Search..." />    <Button variant="outline">Filter</Button>  </ListLayoutFilters>  <ListLayoutContent>{/* Your data table or content here */}</ListLayoutContent>  <ListLayoutFooter>{/* Pagination or other footer content */}</ListLayoutFooter></ListLayout>

Structure

The List Layout component is built with composability in mind, allowing you to use only the sections you need:

  • ListLayout: Main container with consistent spacing and responsive behavior
  • ListLayoutHeader: Page title, description, and action buttons
  • ListLayoutNavigation: Tab navigation or other navigation elements
  • ListLayoutFilters: Search, filters, and action buttons
  • ListLayoutContent: Main content area with scroll handling
  • ListLayoutFooter: Pagination or other footer content

Features

  • Fully Responsive: Adapts to different screen sizes and mobile devices
  • Consistent Layout: Maintains spacing and alignment regardless of content
  • Composable: Use only the sections you need
  • Flexible: Works with any content, not just data tables
  • Accessible: Built with accessibility in mind

Examples

Basic Layout

tsx
<ListLayout>  <ListLayoutHeader title="Clusters" description="Manage your Redpanda clusters" />  <ListLayoutContent>    <div>Your content here</div>  </ListLayoutContent></ListLayout>

With Filters and Actions

tsx
<ListLayout>  <ListLayoutHeader    title="Resource Group"    description="Manage your clusters and networks"    actions={      <>        <Button variant="outline">Copy ID</Button>        <Button>Edit</Button>      </>    }  />  <ListLayoutFilters actions={<Button>Create Cluster</Button>}>    <Input placeholder="Filter clusters..." />    <Button variant="outline">Status</Button>    <Button variant="outline">Cloud</Button>  </ListLayoutFilters>  <ListLayoutContent>    <DataTable />  </ListLayoutContent></ListLayout>

With Navigation Tabs

tsx
<ListLayout>  <ListLayoutHeader title="Resource Management" description="Manage your resources" />  <ListLayoutNavigation>    <Tabs defaultValue="clusters">      <TabsList>        <TabsTrigger value="clusters">Clusters</TabsTrigger>        <TabsTrigger value="networks">Networks</TabsTrigger>        <TabsTrigger value="settings">Settings</TabsTrigger>      </TabsList>    </Tabs>  </ListLayoutNavigation>  <ListLayoutContent>    <TabsContent value="clusters">      <ClustersTable />    </TabsContent>    <TabsContent value="networks">      <NetworksTable />    </TabsContent>  </ListLayoutContent></ListLayout>

Props

ListLayout

Prop Type Default Description
orientation 'horizontal' | 'vertical' 'vertical' Layout orientation
className string Additional CSS classes

ListLayoutHeader

Prop Type Default Description
title string Page title
description string Page description
actions ReactNode Action buttons
className string Additional CSS classes

ListLayoutFilters

Prop Type Default Description
actions ReactNode Action buttons
className string Additional CSS classes

ListLayoutContent

Prop Type Default Description
className string Additional CSS classes

ListLayoutFooter

Prop Type Default Description
className string Additional CSS classes

Design Principles

  • Consistency: All layouts follow the same structure and spacing
  • Responsiveness: Works seamlessly across all device sizes
  • Flexibility: Can accommodate different content types and structures
  • Accessibility: Built with semantic HTML and ARIA attributes
  • Performance: Optimized for large datasets and smooth scrolling

Recent changes

  • patchv1.2.0Pin shipped dependency floors to the version we develop against. Registry items now declare ranges like `^5.1.9` (the actual installed version) instead of collapsing to `^5.0.0`, so consumers start on the known-tested baseline while caret semantics still allow any compatible release within the same major.#133
  • minorv1.1.0Theme docs refresh, readability pass on semantic foregrounds, and consumer-facing Base UI regression fixes.#121
  • minorv1.0.0Post-Base-UI polish. Public API unchanged.#116
  • majorv1.0.0Migrate every Radix-based primitive to `@base-ui/react@^1.4.0` (Base UI).#114
  • minorv0.3.0Add theme-provider component to the registry with documentation and tests. Includes playground type improvements (export RegistryItem, remove as-const boilerplate) and docs site dark mode border color fix.#109
See full history →

Last updated on

Was this page helpful?