Nav/Schema

Sidebar

Prefix System

The prefix option changes the host attribute names that nav-schema looks for when mounting live widgets.

Set a custom prefix

Use a custom prefix when your page already uses the default nav-schema markers or when another system owns that namespace.

prefix.ts
mountSidebar(container, {
  schema,
  prefix: "admin"
});

// Host marker becomes admin-sidebar.

Generated HTML

The host marker changes with the prefix. The schema content stays the same.

<div admin-sidebar schema='{"title":"Admin","items":[]}'></div>