SchemaViewer
API reference and demos for SchemaViewer.
Import
Section titled “Import”import { SchemaViewer } from "@flanksource/clicky-ui/data";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
buildTree |
(…) => SchemaViewerNode[] |
— | Custom tree builder. Defaults to buildSchemaTree. |
className |
string |
— | — |
defaultOpenDepth |
number |
1 |
Root depth opened by default. Defaults to 1, matching the platform tree. |
empty |
ReactNode |
<p className="p-3 text-sm text-muted-foreground">This schema has no fields.</p> |
— |
renderDetail |
(…) => ReactNode |
— | Override the expanded detail panel for annotated fields. |
roots |
SchemaViewerNode[] |
— | Pre-scoped tree roots, for dialogs that want to show a single schema branch. |
schema* |
JsonSchemaObject |
— | — |
showControls |
boolean |
— | — |
toolbarClassName |
string |
— | — |