Blokd UIDocsv1.1.0

Docs / Component reference

Example Viewer

Let a reader try an example, inspect its source and come back to their work. Each file has its own copy button. Type a title below, switch to Source, then return to Example to see your edit.

Example viewer example

Install

sh
npx @fierst/blokd-ui@1.1.0 add example-viewer

Registry dependencies: theme, segmented-control, copy-button.

Exports from ./ui/example-viewer: ExampleViewer.

Download the registry source for example-viewer 1.1.0.

API contracts

ts
export function* ExampleViewer(
  props: {
    title: string;
    children: View;
    files: readonly { filename: string; code: string }[];
  },
  ctx: Ctx,
)