0.0.14 • Published 11 months ago

treeview-svelte v0.0.14

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

treeview-svelte

treeview-svelte is a generic tree component. It is easiest to use with Svelte.

npm i treeview-svelte
<script>
  import { Treeview } from 'treeview-svelte'
</script>

<Treeview
  nodes={[
    {
      name: 'Animal GIFs',
      id: '0'
      children: [
        {
          name: 'Dogs',
          id: '1',
        }, {
          name: 'Goats',
          id: '2',
        }
      ]
    }
  ]}
/>

The <Treeview> component has the following properties and events:

<script>
  import { Treeview } from 'treeview-svelte'

  let nodes: Node[] = []
</script>

<Treeview
  {nodes}
  on:toggle={(event) => /* Fires when a node is collapsed / expanded */}
  on:select={(event) => /* Fires when a node is selected */}
  on:deselect={(event) => /* Fires when a node is deselected */}
  on:reparent={(event) => /* Fires when a node is reparented */}
>

Developing

npm install
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
0.0.14

11 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.9

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago