Noodles Practicing Medicine
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

preact-sidenav

0.3.2 • Public • Published

preact-sidenav

Minimal viable sidenav implementation.

Demo

Size:

File Size Gzip
js 2,1K 902B
css 2,3K 626B

Usage Example

Use and provide content and a navigation var

import Sidenav from 'preact-sidenav';
 
import '../node_modules/preact-sidenav/sidenav.css'
 
 
const Nav = () => (
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
  </ul>
)
 
const App = () => (
    <Sidenav sidebar={ <Nav /> } 
    onClose={close} onOpen={open}>
    <Content />
  </Sidenav>
);
 
render(<App />, document.body);

Scss file is also provided

License

MIT

install

npm i preact-sidenav

Downloadsweekly downloads

16

version

0.3.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability