---
title: "Database Sidebar N.01"
description: "The drill-down sidebar of a database base: a back row, its tables with record counts, the views of the open table, interfaces, and records used."
url: https://gelatinui.com/blocks/database-sidebar-01
markdown_url: https://gelatinui.com/blocks/database-sidebar-01.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/database-sidebar-01"
version: "2026-11-16"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Database Sidebar N.01

> The drill-down sidebar of a database base: a back row, its tables with record counts, the views of the open table, interfaces, and records used.

Page: https://gelatinui.com/blocks/database-sidebar-01

## When to use it

Best for: The nav inside one base of a database app: a way back, the tables, the views, the interfaces, and the record limit.

- Use it as the frame of a database, a spreadsheet app, or a no-code tool, after a person opens one base.
- Pass your words, tables, and views through `content`. Start from `DATABASE_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need.

## When not to use it

- For the nav of an app with no drill-down, use a [Sidebar](https://gelatinui.com/components/sidebar.md).
- For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md).

## Notes for agents

- ⌘B (Ctrl+B elsewhere), the rail, or the collapse button makes it a 48px icon rail.
- The back row is a button that does nothing by itself: pass `onClick`, or a link through `render`.
- The panel owns the current view or interface row. `DatabaseSidebar01Tables` owns the open table, so both show a raised row.
- The records card is a `Meter` of the records against the plan, with a waffle of 60 cells that fill column by column.
- The account row is a plain button: pass `onClick`, or a link or menu trigger through `render`.
- A cookie keeps the collapsed state. Pass `cookie={false}` in a demo.
- `DatabaseSidebar01Page` is only the header bar of a grid page; its buttons do nothing. Replace it with your page.

## Anatomy

```text
DatabaseSidebar01
├─ DatabaseSidebar01Account (0..n)
├─ DatabaseSidebar01Back (0..n)
├─ DatabaseSidebar01Base (0..n)
├─ DatabaseSidebar01Contents (0..n)
├─ DatabaseSidebar01Default (0..n)
├─ DatabaseSidebar01Page (0..n)
├─ DatabaseSidebar01Panel (0..n)
│  └─ DatabaseSidebar01Row (0..n)
├─ DatabaseSidebar01Records (0..n)
│  ├─ DatabaseSidebar01RecordsHeader (0..n)
│  ├─ DatabaseSidebar01RecordsNote (0..n)
│  └─ DatabaseSidebar01RecordsWaffle (0..n)
├─ DatabaseSidebar01Tables (0..n)
│  └─ DatabaseSidebar01TableRow (0..n)
├─ DatabaseSidebar01ViewTile (0..n)
├─ DatabaseSidebar01AccountMenu (0..n)
├─ DatabaseSidebar01MenuPerson (0..n)
├─ DatabaseSidebar01MenuRow (0..n)
└─ DatabaseSidebar01ThemeMenu (0..n)
```

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| DatabaseSidebar01 | `database-sidebar-01` |  |  |  |
| DatabaseSidebar01Account | `database-sidebar-01-account` |  |  |  |
| DatabaseSidebar01Back | `database-sidebar-01-back` |  |  |  |
| DatabaseSidebar01Base | `database-sidebar-01-base` | `data-collapsible` |  |  |
| DatabaseSidebar01Contents | `database-sidebar-01-contents` | `data-collapsible` |  |  |
| DatabaseSidebar01Default | `database-sidebar-01-panel` |  |  |  |
| DatabaseSidebar01Page | `database-sidebar-01-page` |  |  |  |
| DatabaseSidebar01Panel | `database-sidebar-01-panel` |  |  |  |
| DatabaseSidebar01RecordsHeader | `database-sidebar-01-records-header` |  |  | `status-colors` |
| DatabaseSidebar01RecordsNote | `database-sidebar-01-records-note` |  |  |  |
| DatabaseSidebar01RecordsWaffle | `database-sidebar-01-records-waffle` | `data-filled` | `--radius` | `status-colors` |
| DatabaseSidebar01Records | `database-sidebar-01-records` | `data-collapsible` |  |  |
| DatabaseSidebar01TableRow | `database-sidebar-01-table-row` | `data-collapsible` |  | `status-colors` |
| DatabaseSidebar01Tables | `database-sidebar-01-tables` |  |  |  |
| DatabaseSidebar01ViewTile | `database-sidebar-01-view-tile` | `data-tone` | `--radius` | `status-colors` |
| DatabaseSidebar01AccountMenu | `database-sidebar-01-account-menu` |  |  |  |
| DatabaseSidebar01MenuPerson | `database-sidebar-01-menu-person` |  |  |  |
| DatabaseSidebar01MenuRow | `database-sidebar-01-menu-row` |  |  |  |
| DatabaseSidebar01Row | `database-sidebar-01-row` |  |  |  |
| DatabaseSidebar01ThemeMenu | `database-sidebar-01-theme-menu` |  |  |  |

## Usage

Render it with no props for the ready panel and the header bar of a grid page.

```tsx title="base-frame.tsx"
import { DatabaseSidebar01 } from "@/components/blocks/pro/database-sidebar-01/database-sidebar-01";

export function BaseFrame() {
  return <DatabaseSidebar01 />;
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/database-sidebar-01
```

It adds 62 registry items: 78 files, 12732 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Avatar](https://gelatinui.com/components/avatar.md)
- [Badge](https://gelatinui.com/components/badge.md)
- [Breadcrumb](https://gelatinui.com/components/breadcrumb.md)
- [Button](https://gelatinui.com/components/button.md)
- [Generated Avatar](https://gelatinui.com/components/generated-avatar.md)
- [Menu](https://gelatinui.com/components/menu.md)
- [Meter](https://gelatinui.com/components/meter.md)
- [Sidebar](https://gelatinui.com/components/sidebar.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md)
- [Sidebar](https://gelatinui.com/components/sidebar.md)
- [Meter](https://gelatinui.com/components/meter.md)

## Keyboard

| Keys | Action |
| --- | --- |
| ⌘B, Ctrl+B | Collapses or opens the panel. |
| Tab | Moves through the back row, the collapse button, the rows, the group buttons, and the account. |
| Esc | Closes the Drawer. |

## Accessibility

The rows show a tooltip with the name on the icon rail.

The open table and the current view each have `aria-current`.

The records card is a meter with its value in words.

## Motion

| Part | Motion |
| --- | --- |
| Rail | panel · the panel width changes |
| Drawer | sheet · the panel under 768px |
