README
fancy-button
Glitch Button with sprinkles added on top ✨
Uses lit-html, haunted, and rollup.js
🛑 Hey!
This project is experimental. It doesn't work in Edge and IE.
🤔 How to Use
📦 Install via NPM
Add fancy-button
package to your package.json
Import it
import 'fancy-button';
Include the component!
<glitch-button top-right></glitch-button>
🔖 Script Tag
Include this in your head tag:
<script src="https://unpkg.com/fancy-button" defer></script>
Include in the end of your body tag:
<glitch-button top-right></glitch-button>
🛠 Available Attributes
top-right
places the button in top right corner.theme="glitch"
loads Glitch stylesheet.
better-button
?
✅ Why button | better-button | |
---|---|---|
Lighter | 🐌 45.8 KB total (including images and styles) | ⚡ 7.9 KB (brotli) |
Encapsulated | 🙀 Your styles can mess with the button | 🎈 Safe to use in any page |
Cached | ⏳ Doesn’t use cache | ⏱ Cache enabled |
Accessible | ⚠ Could be more accessible | ❤ Everyone can play! |