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

Item

Presentation row with native content and action slots.

All components · Theme builder · Implementation source

Live preview

Open live item preview

Install

Shell
netscript ui:add item

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

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><Item title="Order SO–10480">Ready for fulfillment</Item></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
ItemPropstitleComponentChildrenNo
ItemPropsdescriptionComponentChildrenYes
ItemPropsmediaComponentChildrenYes
ItemPropsactionsComponentChildrenYes
ItemPropsheaderComponentChildrenYes
ItemPropsfooterComponentChildrenYes
ItemPropschevronbooleanYes
ItemPropsvariant"default" | "outline" | "muted"Yes
ItemPropssize"default" | "sm" | "xs"Yes
ItemPropsclassstringYes
TypeScript
ItemProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "title" | "size" | "class">

Keyboard

KeyAction
Tab/Shift+TabMove between native child controls
Enter/SpaceActivate native child buttons; links use Enter

Tokens

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

CSS custom properties referenced directly: --ns-border, --ns-border-width, --ns-card-padding, --ns-control-gap, --ns-fg, --ns-muted, --ns-muted-fg, --ns-radius-badge, --ns-radius-input, --ns-ring, --ns-space-1, --ns-space-2, --ns-stack-gap, --ns-text-caption, --ns-text-small, --ns-text-strong, --ns-weight-strong.

Contract and compatibility

Accessibility pattern: noninteractive presentation

  • Native child controls retain their own semantics and keyboard behavior; no wrapper key manager.

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.