page TreeViewcomponent { seo { title = "TreeView component" description = "Theme-aware, responsive tree view component." } view {
W WRNexusJS
base component

TreeView

Theme-aware, responsive tree view component.

@wrnexus/ui 0.3.67 props1 slots0 events

Usage

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

<TreeView
  size="default"
  color="primary"
  title="Tree View"
  description="description"
  items="[]"
/>

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

Props and attributes

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
titlestringOptional"Tree View"
descriptionstringOptional""
itemsstringOptional[]
variantstringOptional"default"
classstringOptional""

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/TreeView.wrn

component TreeView {
  props {
    size = "default"
    color = "primary"
    title = "Tree View"
    description = ""
    items = []
    variant = "default"
    class = ""
  }
  view {
        <section class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--tree-view wire-next--variant-{variant} {class}">
      {#if title}<strong>{title}</strong>{/if}
      {#if description}<p>{description}</p>{/if}
      {#if items}<div class="wire-next__items">{#each items as item}<span>{item.label}</span>{/each}</div>{/if}
      <slot />
        </section>
    }
}
} }