Skip to content
W WRNexusJS
core component

LegalTableOfContents

Reusable legal table of contents component.

@wrnexus/ui 0.2.673 props0 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<LegalTableOfContents
  title="On this page"
  items="[]"
/>

Legacy mount name: data-component="LegalTableOfContents".

Props and attributes

PropTypeRequirementDefault
titlestringOptional"On this page"
itemsstringOptional[]
classstringOptional""

Slots

This component does not declare a slot.

Events

This component does not declare a custom event.

Source contract

Installed source: components/LegalTableOfContents.wrn

component LegalTableOfContents {
  props {
    title = "On this page"
    items = []
    class = ""
  }
  view {
        <nav aria-label="{title}" class="wire-legal-toc {class}">
        <h2>{title}</h2>
        <ol>{#each items as item}<li>
        <a href="{item.href}">{item.label}</a>
        </li>{/each}</ol>
        </nav>
    }
}