> For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt.

# Detail drawer

**Components:** [`Drawer`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerContent`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerHeader`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerTitle`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerBody`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerResizeHandle`](https://wallarm.github.io/design-system/components/drawer.md), [`Attribute`](https://wallarm.github.io/design-system/components/attribute.md), [`AttributeLabel`](https://wallarm.github.io/design-system/components/attribute.md)


+30 more

[`AttributeValue`](https://wallarm.github.io/design-system/components/attribute.md), [`Heading`](https://wallarm.github.io/design-system/components/heading.md), [`Separator`](https://wallarm.github.io/design-system/components/separator.md), [`HStack`](https://wallarm.github.io/design-system/components/stack.md), [`VStack`](https://wallarm.github.io/design-system/components/stack.md), [`Tabs`](https://wallarm.github.io/design-system/components/tabs.md), [`TabsList`](https://wallarm.github.io/design-system/components/tabs.md), [`TabsTrigger`](https://wallarm.github.io/design-system/components/tabs.md), [`TabsContent`](https://wallarm.github.io/design-system/components/tabs.md), [`TabsLineActions`](https://wallarm.github.io/design-system/components/tabs.md), [`NumericBadge`](https://wallarm.github.io/design-system/components/numeric-badge.md), [`DropdownMenu`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuTrigger`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuContent`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuItem`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuSeparator`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`Button`](https://wallarm.github.io/design-system/components/button.md), [`InlineCodeSnippet`](https://wallarm.github.io/design-system/components/code-snippet.md), [`Tag`](https://wallarm.github.io/design-system/components/tag.md), [`FormatDateTime`](https://wallarm.github.io/design-system/components/format-date-time.md), [`Table`](https://wallarm.github.io/design-system/components/table.md), [`EmptyState`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateMessage`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateTitle`](https://wallarm.github.io/design-system/components/empty-state.md), [`Alert`](https://wallarm.github.io/design-system/components/alert.md), [`AlertContent`](https://wallarm.github.io/design-system/components/alert.md), [`AlertTitle`](https://wallarm.github.io/design-system/components/alert.md), [`AlertControls`](https://wallarm.github.io/design-system/components/alert.md), [`Tooltip`](https://wallarm.github.io/design-system/components/tooltip.md), [`Dialog`](https://wallarm.github.io/design-system/components/dialog.md)

A detail drawer is a `Drawer` with no footer. It shows one entity as `Attribute` rows, titled sections and an optional nested `Table`.

## When to use

| Need                                        | Use                                                                                                                                     | Not                              |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| Read-only details of one row                | This pattern, opened from `Table` `onMasterCellClick`                                                                                   | A new page, a `Dialog`           |
| Edit several fields                         | A separate edit drawer or dialog. See [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md)    | Inputs inside the detail drawer  |
| Edit one field in place                     | `InlineEdit` inside `AttributeValue`                                                                                                    | A form in the drawer             |
| Actions on the entity                       | One "Actions" `DropdownMenu` in `DrawerHeader`                                                                                          | Several header buttons, a footer |
| Related collections (roles, rules, members) | `Tabs` with `NumericBadge` counts, one `Table` per tab                                                                                  | Stacked tables with no tabs      |
| A few titled groups of attributes           | `Heading` sections split by `Separator`                                                                                                 | `Accordion`, a `Card` per group  |
| Confirm a destructive action                | A `Dialog` inside `DrawerContent`. See [Confirmation dialogs](https://wallarm.github.io/design-system/patterns/confirmation-dialogs.md) | `window.confirm`                 |
| Keep the list usable while open             | `modal={false} overlay={false} closeOnOutsideClick={false}`                                                                             | Default props                    |

## Rules

**Drawer**

- Mount one controlled `Drawer` (`open`, `onOpenChange`) for the list. **Never** one per row.
- Open it from the list `Table` `onMasterCellClick`; mark the row with `activeRowId`. Row-menu clicks do not open it.
- Keep the last entity in state after close so content does not blank. To reset state after close, use `onExitComplete`: it fires once the exit animation ends.
- Pass `width={640}`. Use 700 (the Figma frame) only if design confirms it. `width` is read once on mount.
- If resizable, put `DrawerResizeHandle` first in `DrawerContent` (400–1130px).
- **Never** add a `DrawerFooter` or your own close button.
- In tests, pass `data-testid` to `Drawer`. **Never** select by `data-slot`.

**Header actions**

- One `DropdownMenu` in `DrawerHeader`, trigger `Button variant='outline' color='neutral' size='small'` "Actions" + `ChevronDown`.
- Order: edit, state changes, "Go to …" links, `DropdownMenuSeparator`, destructive items.
- Destructive items use `variant='destructive'` and name the entity: "Delete provider".
- Keep the built-in 12px before the close X, though Figma shows 4px.

**Spacing**

- `DrawerBody` owns the 24px gutter. **Never** pad inside it or pass `className` to `DrawerHeader`/`DrawerBody`.
- Attribute rows: `VStack gap={6} className='pb-8'`. Sections: `Separator spacing={4}`. **Never** a `Separator` above `Tabs`: `TabsList` draws its own line.
- Section header: `HStack justify='between' align='center' className='py-8'`, `Heading as='h3' size='md' weight='medium'`, optional `Button size='small'`.
- Full-width tabs: `<div className='-mx-24'>` around `TabsList`, not its `className`. Table 16px from the edge: `<div className='-mx-8'>` around `Table`, never on it. No other negative margins.

**Attributes**

- Always pass `orientation='horizontal'`; the default is vertical.
- One `AttributeLabel` `width` per drawer: 140 matches Figma; up to 256 for long labels. **Never** wrap a label.
- Two columns: `grid grid-cols-2 gap-x-8 gap-y-6`, default label width.
- Section help: an `Info` icon in a `Tooltip` after the heading.

| Data                        | Value                                              | Not                           |
| --------------------------- | -------------------------------------------------- | ----------------------------- |
| Plain text                  | The string as the `AttributeValue` child           | A `Text` with your own size   |
| ID, URL, claim, scope, path | `InlineCodeSnippet code={value} size='md'`         | `Code`, a monospace `span`    |
| Several codes               | Several `InlineCodeSnippet` in `HStack gap={4}`    | One joined string             |
| Role, tag, label            | `Tag`                                              | `Badge`, plain text           |
| Timestamp                   | `FormatDateTime format='datetime' layout='inline'` | `toLocaleString()`            |
| Secret                      | "Set — never shown"                                | Dots, a masked input          |
| Missing value               | `Attribute isEmpty`                                | `N/A`, `0`, your own dash     |
| Icon with text              | `HStack gap={6} align='center'`                    | An `img` with your own margin |

`InlineCodeSnippet` copies on click; `copyable={false}` turns that off.

**Tabs and tables**

- Keep `Tabs` in `DrawerBody` to scroll with the attributes. Pinned tabs: `Tabs asChild` around `DrawerHeader`, `TabsList`, `DrawerBody` (`Drawer` `WithTabs` story); attributes then go in each `TabsContent`.
- Tab action: `Button size='small'` in `TabsLineActions`.
- Nested tables follow [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md). **Never** use `TableActionBar` in a drawer: it renders underneath.

**Does not exist:** `DRAWER_SIZES`, a `size` prop on `Drawer`, `DrawerActions`, `DrawerHeaderActions`, `AttributeGroup`, `AttributeList`, `DescriptionList`, a section component, `fullBleed` on `TabsList` or `Table`.

## Examples

The list opens one shared drawer from the master cell.

Click a provider name: one shared, non-modal drawer opens and the row stays marked. The header
has a single "Actions" menu; the body has horizontal attributes (a code value, a secret, a
timestamp), then full-width tabs with counts, each with an inset nested table. Google Workspace
has no rules, so its table keeps the headers and shows a short empty state.

```tsx
import { useState } from 'react';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { Button } from '@wallarm-org/design-system/Button';
import { InlineCodeSnippet } from '@wallarm-org/design-system/CodeSnippet';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerResizeHandle, DrawerTitle } from '@wallarm-org/design-system/Drawer';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemText, DropdownMenuSeparator, DropdownMenuTrigger } from '@wallarm-org/design-system/DropdownMenu';
import { EmptyState, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { FormatDateTime } from '@wallarm-org/design-system/FormatDateTime';
import { ChevronDown, Plus } from '@wallarm-org/design-system/icons';
import { NumericBadge } from '@wallarm-org/design-system/NumericBadge';
import { Page, PageContent, PageHeader, PageHeaderGroup, PageTitle } from '@wallarm-org/design-system/Page';
import { VStack } from '@wallarm-org/design-system/Stack';
import { type TableCellContext, type TableColumnDef, Table } from '@wallarm-org/design-system/Table';
import { Tabs, TabsContent, TabsLineActions, TabsList, TabsTrigger } from '@wallarm-org/design-system/Tabs';
import { Tag } from '@wallarm-org/design-system/Tag';

export const Default = () => {
  const [selectedId, setSelectedId] = useState<string | null>(null);
  const [open, setOpen] = useState(false);
  const [tab, setTab] = useState('rules');

  const provider = PROVIDERS.find(item => item.id === selectedId) ?? null;

  const renderClaim = ({ row }: TableCellContext<RoleRule, unknown>) => (
    <InlineCodeSnippet code={`${row.original.claim} = ${row.original.value}`} size='md' />
  );
  const renderRole = ({ row }: TableCellContext<RoleRule, unknown>) => (
    <Tag>{row.original.role}</Tag>
  );
  const renderVerifiedAt = ({ row }: TableCellContext<Domain, unknown>) => (
    <FormatDateTime value={row.original.verifiedAt} format='date' />
  );

  const columns: TableColumnDef<Provider>[] = [
    { accessorKey: 'name', header: 'Name', size: 260 },
    { accessorKey: 'protocol', header: 'Protocol', size: 180 },
    { accessorKey: 'issuer', header: 'Issuer', size: 360 },
  ];
  const ruleColumns: TableColumnDef<RoleRule>[] = [
    { id: 'claim', header: 'Claim', size: 300, cell: renderClaim },
    { accessorKey: 'role', header: 'Role', size: 200, cell: renderRole },
  ];
  const domainColumns: TableColumnDef<Domain>[] = [
    { accessorKey: 'name', header: 'Domain', size: 300 },
    { accessorKey: 'verifiedAt', header: 'Verified', size: 200, cell: renderVerifiedAt },
  ];

  const handleMasterCellClick = (id: string) => {
    setSelectedId(id);
    setOpen(true);
  };
  const handleEdit = () => onEditProvider(provider);
  const handleDisable = () => onDisableProvider(provider);
  const handleGoToAuditLog = () => onGoToAuditLog(provider);
  const handleDelete = () => onDeleteProvider(provider);
  const handleCreateRule = () => onCreateRule(provider);

  return (
    <Page name='settings-sso' fullSize fixedHeight data-testid='providers-page'>
      <PageHeader>
        <PageHeaderGroup>
          <PageTitle>SSO providers</PageTitle>
        </PageHeaderGroup>
      </PageHeader>

      <PageContent>
        <Table
          aria-label='SSO providers'
          data={PROVIDERS}
          columns={columns}
          getRowId={getProviderId}
          activeRowId={open ? selectedId : null}
          onMasterCellClick={handleMasterCellClick}
          data-testid='providers-table'
        />
      </PageContent>

      <Drawer
        open={open}
        onOpenChange={setOpen}
        modal={false}
        overlay={false}
        closeOnOutsideClick={false}
        width={640}
        data-testid='provider-drawer'
      >
        <DrawerContent>
          <DrawerResizeHandle />
          <DrawerHeader>
            <DrawerTitle>{provider?.name}</DrawerTitle>
            <DropdownMenu data-testid='provider-actions'>
              <DropdownMenuTrigger asChild>
                <Button variant='outline' color='neutral' size='small'>
                  Actions <ChevronDown />
                </Button>
              </DropdownMenuTrigger>
              <DropdownMenuContent>
                <DropdownMenuItem onSelect={handleEdit}>
                  <DropdownMenuItemText>Edit provider</DropdownMenuItemText>
                </DropdownMenuItem>
                <DropdownMenuItem onSelect={handleDisable}>
                  <DropdownMenuItemText>Disable provider</DropdownMenuItemText>
                </DropdownMenuItem>
                <DropdownMenuItem onSelect={handleGoToAuditLog}>
                  <DropdownMenuItemText>Go to audit log</DropdownMenuItemText>
                </DropdownMenuItem>
                <DropdownMenuSeparator />
                <DropdownMenuItem variant='destructive' onSelect={handleDelete}>
                  <DropdownMenuItemText>Delete provider</DropdownMenuItemText>
                </DropdownMenuItem>
              </DropdownMenuContent>
            </DropdownMenu>
          </DrawerHeader>

          <DrawerBody>
            {provider && (
              <>
                <VStack gap={6} className='pb-8' data-testid='provider-attributes'>
                  <Attribute orientation='horizontal'>
                    <AttributeLabel width={140}>Protocol</AttributeLabel>
                    <AttributeValue>{provider.protocol}</AttributeValue>
                  </Attribute>
                  <Attribute orientation='horizontal'>
                    <AttributeLabel width={140}>Issuer URL</AttributeLabel>
                    <AttributeValue>
                      <InlineCodeSnippet code={provider.issuer} size='md' />
                    </AttributeValue>
                  </Attribute>
                  <Attribute orientation='horizontal'>
                    <AttributeLabel width={140}>Client ID</AttributeLabel>
                    <AttributeValue>
                      <InlineCodeSnippet code={provider.clientId} size='md' />
                    </AttributeValue>
                  </Attribute>
                  <Attribute orientation='horizontal'>
                    <AttributeLabel width={140}>Client secret</AttributeLabel>
                    <AttributeValue>Set — never shown</AttributeValue>
                  </Attribute>
                  <Attribute orientation='horizontal' isEmpty={!provider.defaultRole}>
                    <AttributeLabel width={140}>Default role</AttributeLabel>
                    <AttributeValue>
                      {provider.defaultRole && <Tag>{provider.defaultRole}</Tag>}
                    </AttributeValue>
                  </Attribute>
                  <Attribute orientation='horizontal'>
                    <AttributeLabel width={140}>Created at</AttributeLabel>
                    <AttributeValue>
                      <FormatDateTime
                        value={provider.createdAt}
                        format='datetime'
                        layout='inline'
                      />
                    </AttributeValue>
                  </Attribute>
                </VStack>

                <Tabs value={tab} onChange={setTab} data-testid='provider-tabs'>
                  <div className='-mx-24'>
                    <TabsList>
                      <TabsTrigger value='rules'>
                        Role rules <NumericBadge>{provider.rules.length}</NumericBadge>
                      </TabsTrigger>
                      <TabsTrigger value='domains'>
                        Domains <NumericBadge>{provider.domains.length}</NumericBadge>
                      </TabsTrigger>
                      <TabsLineActions>
                        <Button size='small' onClick={handleCreateRule}>
                          <Plus /> Create rule
                        </Button>
                      </TabsLineActions>
                    </TabsList>
                  </div>
                  <TabsContent value='rules'>
                    <div className='-mx-8 pt-8'>
                      <Table
                        aria-label='Role rules'
                        data={provider.rules}
                        columns={ruleColumns}
                        getRowId={getItemId}
                        data-testid='provider-rules-table'
                      >
                        {provider.rules.length === 0 && (
                          <EmptyState type='collection-empty' data-testid='provider-rules-empty'>
                            <EmptyStateMessage>
                              <EmptyStateTitle>No role rules yet</EmptyStateTitle>
                            </EmptyStateMessage>
                          </EmptyState>
                        )}
                      </Table>
                    </div>
                  </TabsContent>
                  <TabsContent value='domains'>
                    <div className='-mx-8 pt-8'>
                      <Table
                        aria-label='Domains'
                        data={provider.domains}
                        columns={domainColumns}
                        getRowId={getItemId}
                        data-testid='provider-domains-table'
                      >
                        {provider.domains.length === 0 && (
                          <EmptyState type='collection-empty'>
                            <EmptyStateMessage>
                              <EmptyStateTitle>No domains yet</EmptyStateTitle>
                            </EmptyStateMessage>
                          </EmptyState>
                        )}
                      </Table>
                    </div>
                  </TabsContent>
                </Tabs>
              </>
            )}
          </DrawerBody>
        </DrawerContent>
      </Drawer>
    </Page>
  );
};
```

The drawer shell with a resize handle and the header actions menu.

Drag the left edge to resize between 400 and 1130px; `onResizeEnd` gets the final width to
persist. The close X comes built in, so there is no footer and no close button of your own.

```tsx
import { useState } from 'react';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { Button } from '@wallarm-org/design-system/Button';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerResizeHandle, DrawerTitle, DrawerTrigger } from '@wallarm-org/design-system/Drawer';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemText, DropdownMenuSeparator, DropdownMenuTrigger } from '@wallarm-org/design-system/DropdownMenu';
import { ChevronDown } from '@wallarm-org/design-system/icons';
import { VStack } from '@wallarm-org/design-system/Stack';

export const Header = () => {
  const [open, setOpen] = useState(false);

  const handleEdit = () => onEditProvider(OKTA);
  const handleDisable = () => onDisableProvider(OKTA);
  const handleGoToAuditLog = () => onGoToAuditLog(OKTA);
  const handleDelete = () => onDeleteProvider(OKTA);

  return (
    <Drawer open={open} onOpenChange={setOpen} width={640} data-testid='provider-drawer'>
      <DrawerTrigger asChild>
        <Button variant='outline' color='neutral'>
          View {OKTA.name}
        </Button>
      </DrawerTrigger>
      <DrawerContent>
        <DrawerResizeHandle onResizeEnd={onSaveDrawerWidth} />
        <DrawerHeader>
          <DrawerTitle>{OKTA.name}</DrawerTitle>
          <DropdownMenu data-testid='provider-actions'>
            <DropdownMenuTrigger asChild>
              <Button variant='outline' color='neutral' size='small'>
                Actions <ChevronDown />
              </Button>
            </DropdownMenuTrigger>
            <DropdownMenuContent>
              <DropdownMenuItem onSelect={handleEdit}>
                <DropdownMenuItemText>Edit provider</DropdownMenuItemText>
              </DropdownMenuItem>
              <DropdownMenuItem onSelect={handleDisable}>
                <DropdownMenuItemText>Disable provider</DropdownMenuItemText>
              </DropdownMenuItem>
              <DropdownMenuItem onSelect={handleGoToAuditLog}>
                <DropdownMenuItemText>Go to audit log</DropdownMenuItemText>
              </DropdownMenuItem>
              <DropdownMenuSeparator />
              <DropdownMenuItem variant='destructive' onSelect={handleDelete}>
                <DropdownMenuItemText>Delete provider</DropdownMenuItemText>
              </DropdownMenuItem>
            </DropdownMenuContent>
          </DropdownMenu>
        </DrawerHeader>
        <DrawerBody>
          <VStack gap={6} className='pb-8'>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Protocol</AttributeLabel>
              <AttributeValue>{OKTA.protocol}</AttributeValue>
            </Attribute>
          </VStack>
        </DrawerBody>
      </DrawerContent>
    </Drawer>
  );
};
```

Attribute rows with a code value, a secret, a missing value and a timestamp.

Every row is horizontal with the same 140px label. Entra ID has no default role, so that row
stays and shows the empty marker; the codes copy on click.

```tsx
import { useState } from 'react';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { Button } from '@wallarm-org/design-system/Button';
import { InlineCodeSnippet } from '@wallarm-org/design-system/CodeSnippet';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from '@wallarm-org/design-system/Drawer';
import { FormatDateTime } from '@wallarm-org/design-system/FormatDateTime';
import { VStack } from '@wallarm-org/design-system/Stack';
import { Tag } from '@wallarm-org/design-system/Tag';

export const Attributes = () => {
  const [open, setOpen] = useState(false);

  return (
    <Drawer open={open} onOpenChange={setOpen} width={640} data-testid='provider-drawer'>
      <DrawerTrigger asChild>
        <Button variant='outline' color='neutral'>
          View {ENTRA.name}
        </Button>
      </DrawerTrigger>
      <DrawerContent>
        <DrawerHeader>
          <DrawerTitle>{ENTRA.name}</DrawerTitle>
        </DrawerHeader>
        <DrawerBody>
          <VStack gap={6} className='pb-8' data-testid='provider-attributes'>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Client ID</AttributeLabel>
              <AttributeValue>
                <InlineCodeSnippet code={ENTRA.clientId} size='md' />
              </AttributeValue>
            </Attribute>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Client secret</AttributeLabel>
              <AttributeValue>Set — never shown</AttributeValue>
            </Attribute>
            <Attribute orientation='horizontal' isEmpty={!ENTRA.defaultRole}>
              <AttributeLabel width={140}>Default role</AttributeLabel>
              <AttributeValue>{ENTRA.defaultRole && <Tag>{ENTRA.defaultRole}</Tag>}</AttributeValue>
            </Attribute>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Created at</AttributeLabel>
              <AttributeValue>
                <FormatDateTime value={ENTRA.createdAt} format='datetime' layout='inline' />
              </AttributeValue>
            </Attribute>
          </VStack>
        </DrawerBody>
      </DrawerContent>
    </Drawer>
  );
};
```

A section with a title and an action.

The first group needs no title. Each later group starts with a `Separator` and a header row; the
action applies to that section only.

```tsx
import { useState } from 'react';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { Button } from '@wallarm-org/design-system/Button';
import { InlineCodeSnippet } from '@wallarm-org/design-system/CodeSnippet';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from '@wallarm-org/design-system/Drawer';
import { FormatDateTime } from '@wallarm-org/design-system/FormatDateTime';
import { Heading } from '@wallarm-org/design-system/Heading';
import { Separator } from '@wallarm-org/design-system/Separator';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { Tag } from '@wallarm-org/design-system/Tag';

export const Section = () => {
  const [open, setOpen] = useState(false);

  const handleEditDefaults = () => onEditProvider(OKTA);

  return (
    <Drawer open={open} onOpenChange={setOpen} width={640} data-testid='provider-drawer'>
      <DrawerTrigger asChild>
        <Button variant='outline' color='neutral'>
          View {OKTA.name}
        </Button>
      </DrawerTrigger>
      <DrawerContent>
        <DrawerHeader>
          <DrawerTitle>{OKTA.name}</DrawerTitle>
        </DrawerHeader>
        <DrawerBody>
          <VStack gap={6} className='pb-8'>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Protocol</AttributeLabel>
              <AttributeValue>{OKTA.protocol}</AttributeValue>
            </Attribute>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Issuer URL</AttributeLabel>
              <AttributeValue>
                <InlineCodeSnippet code={OKTA.issuer} size='md' />
              </AttributeValue>
            </Attribute>
          </VStack>

          <Separator spacing={4} />

          <HStack
            justify='between'
            align='center'
            className='py-8'
            data-testid='provider-defaults-section'
          >
            <Heading as='h3' size='md' weight='medium'>
              Defaults
            </Heading>
            <Button size='small' variant='outline' color='neutral' onClick={handleEditDefaults}>
              Edit defaults
            </Button>
          </HStack>
          <VStack gap={6} className='pb-8'>
            <Attribute orientation='horizontal' isEmpty={!OKTA.defaultRole}>
              <AttributeLabel width={140}>Default role</AttributeLabel>
              <AttributeValue>{OKTA.defaultRole && <Tag>{OKTA.defaultRole}</Tag>}</AttributeValue>
            </Attribute>
            <Attribute orientation='horizontal'>
              <AttributeLabel width={140}>Created at</AttributeLabel>
              <AttributeValue>
                <FormatDateTime value={OKTA.createdAt} format='datetime' layout='inline' />
              </AttributeValue>
            </Attribute>
          </VStack>
        </DrawerBody>
      </DrawerContent>
    </Drawer>
  );
};
```

Full-width tabs with a count and an inset nested table that stays visible when empty.

Google Workspace has no rules yet: the table keeps its headers and shows a one-line empty state
with no action, since "Create rule" already sits on the tab line.

```tsx
import { useState } from 'react';
import { Button } from '@wallarm-org/design-system/Button';
import { InlineCodeSnippet } from '@wallarm-org/design-system/CodeSnippet';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from '@wallarm-org/design-system/Drawer';
import { EmptyState, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { Plus } from '@wallarm-org/design-system/icons';
import { NumericBadge } from '@wallarm-org/design-system/NumericBadge';
import { type TableCellContext, type TableColumnDef, Table } from '@wallarm-org/design-system/Table';
import { Tabs, TabsContent, TabsLineActions, TabsList, TabsTrigger } from '@wallarm-org/design-system/Tabs';
import { Tag } from '@wallarm-org/design-system/Tag';

export const NestedTable = () => {
  const [open, setOpen] = useState(false);
  const [tab, setTab] = useState('rules');

  const renderClaim = ({ row }: TableCellContext<RoleRule, unknown>) => (
    <InlineCodeSnippet code={`${row.original.claim} = ${row.original.value}`} size='md' />
  );
  const renderRole = ({ row }: TableCellContext<RoleRule, unknown>) => (
    <Tag>{row.original.role}</Tag>
  );

  const ruleColumns: TableColumnDef<RoleRule>[] = [
    { id: 'claim', header: 'Claim', size: 300, cell: renderClaim },
    { accessorKey: 'role', header: 'Role', size: 200, cell: renderRole },
  ];

  const handleCreateRule = () => onCreateRule(GOOGLE);

  return (
    <Drawer open={open} onOpenChange={setOpen} width={640} data-testid='provider-drawer'>
      <DrawerTrigger asChild>
        <Button variant='outline' color='neutral'>
          View {GOOGLE.name}
        </Button>
      </DrawerTrigger>
      <DrawerContent>
        <DrawerHeader>
          <DrawerTitle>{GOOGLE.name}</DrawerTitle>
        </DrawerHeader>
        <DrawerBody>
          <Tabs value={tab} onChange={setTab} data-testid='provider-tabs'>
            <div className='-mx-24'>
              <TabsList>
                <TabsTrigger value='rules'>
                  Role rules <NumericBadge>{GOOGLE.rules.length}</NumericBadge>
                </TabsTrigger>
                <TabsLineActions>
                  <Button size='small' onClick={handleCreateRule}>
                    <Plus /> Create rule
                  </Button>
                </TabsLineActions>
              </TabsList>
            </div>
            <TabsContent value='rules'>
              <div className='-mx-8 pt-8'>
                <Table
                  aria-label='Role rules'
                  data={GOOGLE.rules}
                  columns={ruleColumns}
                  getRowId={getItemId}
                  data-testid='provider-rules-table'
                >
                  {GOOGLE.rules.length === 0 && (
                    <EmptyState type='collection-empty' data-testid='provider-rules-empty'>
                      <EmptyStateMessage>
                        <EmptyStateTitle>No role rules yet</EmptyStateTitle>
                      </EmptyStateMessage>
                    </EmptyState>
                  )}
                </Table>
              </div>
            </TabsContent>
          </Tabs>
        </DrawerBody>
      </DrawerContent>
    </Drawer>
  );
};
```

## States

| State                   | Show                                                                                                                                                                                           | Example component |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| Entity loading          | `loading` on every `Attribute` (skeleton label is 100 wide whatever `width`). Not a `Loader` over the body                                                                                     | `Attribute`       |
| Nested table loading    | `isLoading` with `skeletonCount={3}`                                                                                                                                                           | `Table`           |
| Nested collection empty | Keep headers; `type='collection-empty'` as a direct `Table` child when `rows.length === 0 && !isLoading`. Title and description only, no `EmptyStateActions`. Not `TableEmptyState` (too tall) | `EmptyState`      |
| Field has no value      | `isEmpty`; never hide the row                                                                                                                                                                  | `Attribute`       |
| Viewing an old version  | `color='info'` first in `DrawerBody`, "Back to current" and "Restore" in `AlertControls`; disable header actions                                                                               | `Alert`           |
| Row open in the drawer  | `activeRowId={selectedId}`; not a row `className`                                                                                                                                              | `Table`           |
| Action running          | `loading` on its button, then a toast; keep the drawer open                                                                                                                                    | `Button`          |

The entity is loading.

The entity is still loading: every `Attribute` shows its skeleton and the nested table shows
three skeleton rows. No `Loader` over the body, and the header keeps its title.

```tsx
import { useState } from 'react';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerTitle } from '@wallarm-org/design-system/Drawer';
import { Page, PageContent, PageHeader, PageHeaderGroup, PageTitle } from '@wallarm-org/design-system/Page';
import { Separator } from '@wallarm-org/design-system/Separator';
import { VStack } from '@wallarm-org/design-system/Stack';
import { type TableColumnDef, Table } from '@wallarm-org/design-system/Table';

export const Loading = () => {
  const [selectedId, setSelectedId] = useState<string | null>(null);
  const [open, setOpen] = useState(false);

  const provider = PROVIDERS.find(item => item.id === selectedId) ?? null;

  const columns: TableColumnDef<Provider>[] = [
    { accessorKey: 'name', header: 'Name', size: 260 },
    { accessorKey: 'protocol', header: 'Protocol', size: 180 },
    { accessorKey: 'issuer', header: 'Issuer', size: 360 },
  ];
  const ruleColumns: TableColumnDef<RoleRule>[] = [
    { accessorKey: 'value', header: 'Claim', size: 300 },
    { accessorKey: 'role', header: 'Role', size: 200 },
  ];

  const handleMasterCellClick = (id: string) => {
    setSelectedId(id);
    setOpen(true);
  };

  return (
    <Page name='settings-sso' fullSize fixedHeight data-testid='providers-page'>
      <PageHeader>
        <PageHeaderGroup>
          <PageTitle>SSO providers</PageTitle>
        </PageHeaderGroup>
      </PageHeader>

      <PageContent>
        <Table
          aria-label='SSO providers'
          data={PROVIDERS}
          columns={columns}
          getRowId={getProviderId}
          activeRowId={open ? selectedId : null}
          onMasterCellClick={handleMasterCellClick}
          data-testid='providers-table'
        />
      </PageContent>

      <Drawer
        open={open}
        onOpenChange={setOpen}
        modal={false}
        overlay={false}
        closeOnOutsideClick={false}
        width={640}
        data-testid='provider-drawer'
      >
        <DrawerContent>
          <DrawerHeader>
            <DrawerTitle>{provider?.name}</DrawerTitle>
          </DrawerHeader>
          <DrawerBody>
            <VStack gap={6} className='pb-8' data-testid='provider-attributes'>
              <Attribute orientation='horizontal' loading>
                <AttributeLabel width={140}>Protocol</AttributeLabel>
                <AttributeValue>{provider?.protocol}</AttributeValue>
              </Attribute>
              <Attribute orientation='horizontal' loading>
                <AttributeLabel width={140}>Issuer URL</AttributeLabel>
                <AttributeValue>{provider?.issuer}</AttributeValue>
              </Attribute>
              <Attribute orientation='horizontal' loading>
                <AttributeLabel width={140}>Client ID</AttributeLabel>
                <AttributeValue>{provider?.clientId}</AttributeValue>
              </Attribute>
              <Attribute orientation='horizontal' loading>
                <AttributeLabel width={140}>Created at</AttributeLabel>
                <AttributeValue>{provider?.createdAt}</AttributeValue>
              </Attribute>
            </VStack>
            <Separator spacing={4} />
            <div className='-mx-8 pt-8'>
              <Table
                aria-label='Role rules'
                data={[]}
                columns={ruleColumns}
                getRowId={getItemId}
                isLoading
                skeletonCount={3}
                data-testid='provider-rules-table'
              />
            </div>
          </DrawerBody>
        </DrawerContent>
      </Drawer>
    </Page>
  );
};
```

Viewing an old version.

Viewing an old version: an info `Alert` comes first in the body with "Back to current" and
"Restore", and the header "Actions" menu is disabled until the reader goes back.

```tsx
import { useState } from 'react';
import { Alert, AlertContent, AlertControls, AlertDescription, AlertIcon, AlertTitle } from '@wallarm-org/design-system/Alert';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { Button } from '@wallarm-org/design-system/Button';
import { InlineCodeSnippet } from '@wallarm-org/design-system/CodeSnippet';
import { Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerTitle } from '@wallarm-org/design-system/Drawer';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemText, DropdownMenuSeparator, DropdownMenuTrigger } from '@wallarm-org/design-system/DropdownMenu';
import { ChevronDown } from '@wallarm-org/design-system/icons';
import { Page, PageContent, PageHeader, PageHeaderGroup, PageTitle } from '@wallarm-org/design-system/Page';
import { VStack } from '@wallarm-org/design-system/Stack';
import { type TableColumnDef, Table } from '@wallarm-org/design-system/Table';
import { Tag } from '@wallarm-org/design-system/Tag';

export const OldVersion = () => {
  const [selectedId, setSelectedId] = useState<string | null>(null);
  const [open, setOpen] = useState(false);
  const [isOldVersion, setIsOldVersion] = useState(true);

  const provider = PROVIDERS.find(item => item.id === selectedId) ?? null;
  // The old version had a default role that was removed later.
  const defaultRole = isOldVersion ? 'Security analyst' : provider?.defaultRole;

  const columns: TableColumnDef<Provider>[] = [
    { accessorKey: 'name', header: 'Name', size: 260 },
    { accessorKey: 'protocol', header: 'Protocol', size: 180 },
    { accessorKey: 'issuer', header: 'Issuer', size: 360 },
  ];

  const handleMasterCellClick = (id: string) => {
    setSelectedId(id);
    setIsOldVersion(true);
    setOpen(true);
  };
  const handleBackToCurrent = () => setIsOldVersion(false);
  const handleRestore = () => onRestoreVersion(provider);
  const handleEdit = () => onEditProvider(provider);
  const handleDelete = () => onDeleteProvider(provider);

  return (
    <Page name='settings-sso' fullSize fixedHeight data-testid='providers-page'>
      <PageHeader>
        <PageHeaderGroup>
          <PageTitle>SSO providers</PageTitle>
        </PageHeaderGroup>
      </PageHeader>

      <PageContent>
        <Table
          aria-label='SSO providers'
          data={PROVIDERS}
          columns={columns}
          getRowId={getProviderId}
          activeRowId={open ? selectedId : null}
          onMasterCellClick={handleMasterCellClick}
          data-testid='providers-table'
        />
      </PageContent>

      <Drawer
        open={open}
        onOpenChange={setOpen}
        modal={false}
        overlay={false}
        closeOnOutsideClick={false}
        width={640}
        data-testid='provider-drawer'
      >
        <DrawerContent>
          <DrawerHeader>
            <DrawerTitle>{provider?.name}</DrawerTitle>
            <DropdownMenu data-testid='provider-actions'>
              <DropdownMenuTrigger asChild>
                <Button variant='outline' color='neutral' size='small' disabled={isOldVersion}>
                  Actions <ChevronDown />
                </Button>
              </DropdownMenuTrigger>
              <DropdownMenuContent>
                <DropdownMenuItem onSelect={handleEdit}>
                  <DropdownMenuItemText>Edit provider</DropdownMenuItemText>
                </DropdownMenuItem>
                <DropdownMenuSeparator />
                <DropdownMenuItem variant='destructive' onSelect={handleDelete}>
                  <DropdownMenuItemText>Delete provider</DropdownMenuItemText>
                </DropdownMenuItem>
              </DropdownMenuContent>
            </DropdownMenu>
          </DrawerHeader>

          <DrawerBody>
            {isOldVersion && (
              <Alert color='info' data-testid='provider-version-alert'>
                <AlertIcon />
                <AlertContent>
                  <AlertTitle>You are viewing the version from Oct 28, 2026</AlertTitle>
                  <AlertDescription>Changes made after it are not shown.</AlertDescription>
                </AlertContent>
                <AlertControls>
                  <Button
                    variant='secondary'
                    color='neutral'
                    size='small'
                    onClick={handleBackToCurrent}
                  >
                    Back to current
                  </Button>
                  <Button variant='secondary' color='neutral' size='small' onClick={handleRestore}>
                    Restore
                  </Button>
                </AlertControls>
              </Alert>
            )}
            {provider && (
              <VStack gap={6} className='pt-12 pb-8' data-testid='provider-attributes'>
                <Attribute orientation='horizontal'>
                  <AttributeLabel width={140}>Protocol</AttributeLabel>
                  <AttributeValue>{provider.protocol}</AttributeValue>
                </Attribute>
                <Attribute orientation='horizontal'>
                  <AttributeLabel width={140}>Client ID</AttributeLabel>
                  <AttributeValue>
                    <InlineCodeSnippet code={provider.clientId} size='md' />
                  </AttributeValue>
                </Attribute>
                <Attribute orientation='horizontal' isEmpty={!defaultRole}>
                  <AttributeLabel width={140}>Default role</AttributeLabel>
                  <AttributeValue>{defaultRole && <Tag>{defaultRole}</Tag>}</AttributeValue>
                </Attribute>
              </VStack>
            )}
          </DrawerBody>
        </DrawerContent>
      </Drawer>
    </Page>
  );
};
```

## What your app owns

| You own                                 | The DS owns                        |
| --------------------------------------- | ---------------------------------- |
| `selectedId`, `open`, fetching          | Animation, focus trap, close X     |
| Width; persisting it via `onResizeEnd`  | Resize drag and limits             |
| Attributes, sections, tabs, label width | Row height, truncation, skeletons  |
| Menu items and handlers                 | Menu positioning and keyboard      |
| Section headers, grid, bleed offsets    | Body gutter, header spacing        |
| Confirmation, version restore           | Nothing; compose `Dialog`, `Alert` |

## Related

- [Complex drawer](https://wallarm.github.io/design-system/patterns/complex-drawer.md) for events with charts, [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md), [Resource list page](https://wallarm.github.io/design-system/patterns/resource-list-page.md)
- [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md), [Confirmation dialogs](https://wallarm.github.io/design-system/patterns/confirmation-dialogs.md)
- [Action-result toasts](https://wallarm.github.io/design-system/patterns/feedback-toasts.md), [Empty states](https://wallarm.github.io/design-system/patterns/empty-states.md)
- [Spacing](https://wallarm.github.io/design-system/foundations/spacing.md), [Layering](https://wallarm.github.io/design-system/foundations/layering.md)
