jonsuh / hamburgers

Tasty CSS-animated Hamburgers
https://jonsuh.com/hamburgers
MIT License
7.05k stars 1.63k forks source link

[Feature Request] Make it react components? #61

Open rockmandash opened 6 years ago

rockmandash commented 6 years ago

Hello, first of all, thank you for this wonderful library. As app grows, its easier to make hamburgers a react component. Something like this

<Hamburger
  active={this.state.active}
  type="slider"
  onClick={() => this.setState({ active: !this.state.active })}
/>

And add react-emotion support, there won't be any css conflict and additional sass logic. Thank you.

jonsuh commented 5 years ago

Will consider this for v2

camelCaseDave commented 5 years ago

See https://github.com/AuvikAlive/react-animated-burgers. The project has made animated burger buttons as react components based on this project. It's dependent on styled-components.

ghostdevv commented 2 years ago

If needed there is a svelte version: https://npmjs.com/svelte-hamburgers

luigimannoni commented 7 months ago

I've opted into hamburger-react (https://hamburger-react.netlify.app/) since react-animated-burgers linked above does not support latest React. Simple and slim, does not have the same level of customisation, though.