slak-menu

A Slak menu component made with hyperscript

Usage no npm install needed!

<script type="module">
  import slakMenu from 'https://cdn.skypack.dev/slak-menu';
</script>

README

slak-menu

A Slak virtual-dom menu component. Renders a horizontal list and highlights the selected menu item.

Import

var Menu = require('slak-menu');

Construct

// Build a menu with the given items
var menu = Menu.Menu([{name:'Zendo'}, {name:'Schedule'}], emit);

Render

// Render a menu component to a hyperscript tree.
var tree = Menu.render(menu);