r/web_programming • u/rumborghini • Feb 17 '22
I’ve built a fully themeable and accessible heart-shaped toggle switch component for React. [Details in the comments]
43
Upvotes
2
2
r/web_programming • u/rumborghini • Feb 17 '22
2
2
3
u/rumborghini Feb 17 '22 edited Feb 17 '22
Hey, r/web_programming!
I’ve built a fully themeable and accessible heart-shaped toggle switch component for React. Inspired by Tore Bernhoft’s I heart toggle Dribbble shot.
🔑 Key Benefits
🪶 Ultralight: ~2kb (gzipped).
⌨️ Type-Safe: Written in TypeScript.
🎨 Themable: Fully customisable look and feel.
♿️ Accessible
Adheres to the best practices when it comes to the usage of ARIA attributes.
Allows you to set additional ARIA attributes on the underlying
inputelement.Implements an accessible alternative to the
disabledattribute —aria-disabled.Implements keyboard-only focus that works even in Safari.
🗄 Repository: GitHub
💻 Live Demo: CodeSandbox
🖼 Storybook: Netlify
🙋🏼♂️ I hope you will find it useful! Feedback and questions are welcome.