Composition example
JSON viewer · Properties, expansion and copy feedback
Preview
Code
render: () => (
<Stack>
<JsonTree
label="Result"
data={{
path: "/workspace/meowland/src/main.ts",
count: 3,
enabled: true,
empty: null,
nested: { text: "<content>\nsecond line", items: [1, 2] },
}}
/>
<JsonTree
label="Copy failure example"
data={{ message: "You can select the text to copy" }}
onCopy={async () => {
throw new Error("clipboard unavailable");
}}
/>
</Stack>
)