xyd 0.1.0-beta - Coming Soon

Reference
/
Sidebar

Sidebar

Sidebar configuration

Properties

    group
    string
    The name of the group
    page
    string
    Makes the group itself a real page (the "Group Page" feature). When set, the group resolves to this route — so it becomes a clickable breadcrumb automatically. (Clickable group headers in the sidebar are still Coming Soon.)
    title
    string

    Label for a entry — a page reference with no group and no

    pages . It overrides the page's frontmatter title, and is the only way to label a route that has no markdown behind it, such as a generated API reference: without it the sidebar row renders blank.

    pages
    array of PageURL
    Page URL type
      SourcePage
      SourcePage
      A page whose URL differs from its markdown file path. Sugar for the VirtualPage object form — normalized at boot ( `{ page, source }` → `{ virtual: source, page }` ), so the whole engine only ever sees the virtual shape. Use it when several files should share a URL scheme, e.g. per-framework variants: ```json { "page": "docs/angular/logs", "source": "docs/logs.angular" } { "page": "docs/bun/logs", "source": "docs/logs.bun" } ```
        page
        string
        Required
        The URL the page serves at.
        source
        string
        Required
        The markdown file path, extension-less — like a string page entry ( `docs/logs.angular` → `docs/logs.angular.md` / `.mdx` ).
        title
        string
        Optional sidebar label override.
        contextControls
        ContextControls
        Page context controls for THIS page (replaces the global set).
      Sidebar
      Sidebar
      Sidebar configuration
        group
        string
        The name of the group
        page
        string
        Makes the group itself a real page (the "Group Page" feature). When set, the group resolves to this route — so it becomes a clickable breadcrumb automatically. (Clickable group headers in the sidebar are still Coming Soon.)
        title
        string
        Label for a `{ page, title }` entry — a page reference with no `group` and no `pages` . It overrides the page's frontmatter title, and is the only way to label a route that has no markdown behind it, such as a generated API reference: without it the sidebar row renders blank.
        pages
        array of PageURL
        The relative paths to the markdown files that will serve as pages. Note: groups are recursive, so to add a sub-folder add another group object in the page array.
        icon
        string
        The icon of the group.
        expanded
        boolean
        Open this group on load, even when the reader is on a page outside it. Sets the INITIAL state only — it is a default, not a lock: the group still opens by itself when it holds the active page, and a reader who collapses it keeps it collapsed for as long as they stay on the page (like the rest of the sidebar's open state, it starts over on the next one). Only meaningful for a nested group — top-level groups are always open.
        order
        Order
        The order of the group.
        asToc
        Treat this group's pages as a table of contents instead of real pages. Their markdown files are NOT routable (no routes, no prerender) — the content of every page is injected as a section into the enclosing route's index page, sidebar items scroll to those sections (with scroll-spy active marking), and the right-hand TOC is hidden on that composed page. `true` enables it with defaults; the object form tunes behaviors (all default to enabled).
          SidebarAsTocOptions
          SidebarAsTocOptions
          Behavior options for an `asToc` sidebar group (the object form). Every option defaults to `true` — `asToc: true` ≡ `asToc: {}` .
            indicator
            boolean
            TOC-style visual indicator on the group's sidebar items (the vertical track line the right-hand TOC uses). Default `true` .
            breadcrumbs
            boolean
            Breadcrumbs on the composed host page that follow the section being read (group name / section title, updated by scroll). Default `true` .
          boolean
          boolean
      ComponentPage
      ComponentPage
      A custom React component rendered AS a sidebar item. `component` is a path (relative to the docs project, e.g. `"./components/TryNewVersion"` ) to a module whose DEFAULT export is a function component. It renders inside the framework context, so it may use `@xyd-js/framework/react` hooks; `props` are passed to it. `fixed: true` pins it in the sidebar's fixed region (above the scrollable list).
        fixed
        boolean
        Pin this item in the sidebar's fixed region (stays visible on scroll).
        component
        Required
        A path to a default-export React component (relative to the docs project), or an object with that path under `import` plus `props` for the component.
          ComponentPageImport
          ComponentPageImport
          Object form of `ComponentPage.component` : an import path plus optional props.
            import
            string
            Required
            Path to a default-export React component, relative to the docs project.
            props
            Record<string, any>
            Props passed to the component.
          string
          string
      string
      string
      VirtualPage
      VirtualPage
    icon
    string
    The icon of the group.
    expanded
    boolean
    Open this group on load, even when the reader is on a page outside it. Sets the INITIAL state only — it is a default, not a lock: the group still opens by itself when it holds the active page, and a reader who collapses it keeps it collapsed for as long as they stay on the page (like the rest of the sidebar's open state, it starts over on the next one). Only meaningful for a nested group — top-level groups are always open.
    order
    Order
    The order of the group.
    asToc

    Treat this group's pages as a table of contents instead of real pages. Their markdown files are NOT routable (no routes, no prerender) — the content of every page is injected as a section into the enclosing route's index page, sidebar items scroll to those sections (with scroll-spy active marking), and the right-hand TOC is hidden on that composed page.

    true enables it with defaults; the object form tunes behaviors (all default to enabled).

      SidebarAsTocOptions
      SidebarAsTocOptions

      Behavior options for an asToc sidebar group (the object form). Every option defaults to true — asToc: true ≡ asToc: .

        indicator
        boolean

        TOC-style visual indicator on the group's sidebar items (the vertical track line the right-hand TOC uses). Default true .

        breadcrumbs
        boolean

        Breadcrumbs on the composed host page that follow the section being read (group name / section title, updated by scroll). Default true .

      boolean
      boolean
Built with

Show your support! Star us on GitHub ⭐️