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

EmptyState

Shared empty-state callout block for list rails, table gaps, and detail sidebars.

All components · Theme builder · Implementation source

Live preview

Open live empty-state preview

Install

Shell
netscript ui:add empty-state

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 { EmptyState } from '@app/components/ui/empty-state.tsx';

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><EmptyState heading="No orders yet">Create your first order to get started.</EmptyState></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
EmptyStatePropschildrenRenderableNo
EmptyStatePropsclassstringYes
EmptyStatePropsheadingRenderableYes
TypeScript
EmptyStateProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "children">

Keyboard

Presentation component; no component-specific keyboard interactions.

Tokens

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

CSS custom properties referenced directly: --ns-border, --ns-card-padding, --ns-fg, --ns-font-sans, --ns-leading-body, --ns-leading-heading, --ns-muted-fg, --ns-radius-card, --ns-radius-md, --ns-space-1, --ns-space-4, --ns-text-body, --ns-text-heading, --ns-text-sm, --ns-tracking-body, --ns-tracking-heading, --ns-weight-body, --ns-weight-heading.

Contract and compatibility

Accessibility pattern: noninteractive presentation

  • Native DOM attributes pass through where the implementation accepts them.

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.