Component docs
Loading
import { ToolInspectorShell } from "@pixxl-tools/components";
// In Server Components:
import { ToolInspectorShell } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
activeId (required) | TId | — | — |
aria-label (required) | string | — | Accessible name of the panel rail. |
onActiveIdChange (required) | (id: TId) => void | — | — |
panels (required) | Array<ToolInspectorPanel<TId>> | — | — |
classes | ToolInspectorShellClassNames | — | — |
classNames | ToolInspectorShellClassNames | — | — |
activeIdrequiredTId
aria-labelrequiredstring
Accessible name of the panel rail.
onActiveIdChangerequired(id: TId) => void
panelsrequiredArray<ToolInspectorPanel<TId>>
classesToolInspectorShellClassNames
classNamesToolInspectorShellClassNames
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const [activeId, setActiveId] = useState("inspect");
<ToolInspectorShell
activeId={activeId}
aria-label="Inspector"
onActiveIdChange={setActiveId}
panels={[{ Icon: SearchIcon, content: "Selected item", id: "inspect", label: "Inspect" }]}
/>