# Panel

Dense secondary surface for filters, rails, and grouped operational controls.

[All components](https://rickylabs.github.io/netscript/design-system/components/) · [Theme builder](https://rickylabs.github.io/netscript/create/) · [Implementation source](https://github.com/rickylabs/netscript/blob/main/packages/fresh-ui/registry/components/ui/panel.tsx)

## Live preview

[Open live panel preview](https://rickylabs.github.io/netscript/assets/fresh-ui/preview/?component=panel&theme=studio-utility)

## Install

```bash
netscript ui:add panel
```

## Usage and examples

The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.

```tsx
import { useState } from 'preact/hooks';
import { Panel } from '@app/components/ui/panel.tsx';

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><Panel><Panel.Header><Panel.Title>Recent activity</Panel.Title></Panel.Header><Panel.Body>Your order has shipped.</Panel.Body></Panel></div><p role="status">{notice}</p></>);
}
```

## Props

Generated from native `deno doc --json --private` over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.

| Owner | Prop | Type | Optional | Description |
| --- | --- | --- | --- | --- |
| `PanelProps` | `children` | `ComponentChildren` | No |  |
| `PanelProps` | `class` | `string` | Yes |  |
| `PanelProps` | `tone` | `PanelTone` | Yes |  |
| `PanelProps` | `variant` | `PanelTone` | Yes | Canonical visual axis; tone is a compatibility alias. |
| `PanelSectionProps` | `children` | `ComponentChildren` | No |  |
| `PanelSectionProps` | `class` | `string` | Yes |  |
| `PanelTextProps` | `children` | `ComponentChildren` | No |  |
| `PanelTextProps` | `class` | `string` | Yes |  |

```typescript
type PanelTone = "default" | "muted" | "raised"
PanelProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "children">
PanelSectionProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "children">
PanelTextProps extends Omit<JSX.HTMLAttributes<HTMLParagraphElement>, "class" | "children">
```

## Keyboard

Presentation component; no component-specific keyboard interactions.

## Tokens

Semantic contract roles: `border/default`, `radius/card`, `space/stack/gap`, `surface/card`, `surface/muted`, `surface/raised`, `text/muted`.

CSS custom properties referenced directly: `--ns-border`, `--ns-border-subtle`, `--ns-card`, `--ns-card-footer`, `--ns-card-padding`, `--ns-fg`, `--ns-muted`, `--ns-shadow-xs`, `--ns-space-3`, `--ns-space-4`, `--ns-space-5`, `--ns-surface`, `--ns-surface-raised`.

## Contract and compatibility

Accessibility pattern: noninteractive presentation

- Native DOM attributes pass through where the implementation accepts them.
- variant is canonical; tone remains a compatibility prop.

Design contract values marked planned are not implementation props. The props above describe what ships today.
