Skip to main content
NetScriptdocs Search docs ⌘K v0.0.9
Browse documentation

Panel

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

All components · Theme builder · Implementation source

Live preview

Open live panel preview

Install

Shell
netscript ui:add panel

Usage and examples

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

TypeScript
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.

OwnerPropTypeOptionalDescription
PanelPropschildrenComponentChildrenNo
PanelPropsclassstringYes
PanelPropstonePanelToneYes
PanelPropsvariantPanelToneYesCanonical visual axis; tone is a compatibility alias.
PanelSectionPropschildrenComponentChildrenNo
PanelSectionPropsclassstringYes
PanelTextPropschildrenComponentChildrenNo
PanelTextPropsclassstringYes
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.

Search all documentation

Type a term to search the documentation.