be-selectable
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

be-selectable

<nav>
    <a href="/demo/foo/firstView" be-selectable>My First View</a>
    <a href="/demo/foo/secondView" be-selectable>My Second View</a>
</nav>

Adds class "selected" to anchor element when the current route matches the href.

Additional features:

  • [x] Listen for client-side address changes.
  • [x] Fire event when selected status changes.
  • [ ] Configure class name.
  • [ ] Allow for transform to be specified on host container.

Package Sidebar

Install

npm i be-selectable

Weekly Downloads

6

Version

0.0.7

License

MIT

Unpacked Size

106 kB

Total Files

9

Last publish

Collaborators

  • bahrus