Holo button
A translucent button projected as a hologram.
<piix-holo-button>DOM + canvasForm-readyNew<piix-holo-button>Engage</piix-holo-button>
Hue
Size
A frosted pane in a rainbow foil frame that lights up where the pointer is, scanlines drifting through it and targeting brackets that close in on hover. Press it and the label glitches; it flickers on the first time it scrolls into view.
Installation
<!-- once, anywhere on the page: every component --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>
<!-- just holo button (the shared engine loads itself, once) --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/dist/c/holo-button.min.js"></script>
npm install piixpal // once, in your entry file import "piixpal";
// npm install piixpal
import "piixpal";
export default function Page() {
return (
<piix-holo-button>Engage</piix-holo-button>
);
}
Usage
<piix-holo-button>Engage</piix-holo-button>
Examples
Hues
<piix-holo-button>Engage</piix-holo-button> <piix-holo-button hue="300">Connect</piix-holo-button> <piix-holo-button hue="140">Scan</piix-holo-button>
Sizes
<piix-holo-button size="sm">Small</piix-holo-button> <piix-holo-button>Medium</piix-holo-button> <piix-holo-button size="lg">Large</piix-holo-button>
API reference
| Attribute | What it does | Default |
|---|---|---|
hue | the projector colour, 0 to 360 | 190 |
size | sm md lg | md |
type | button submit reset | button |
href | makes it a link | – |
disabled | greyed out, can't be pressed | – |
Events
| Event | When |
|---|---|
click | like any button |
Accessibility
- A real, form-associated button.
- Brackets, foil and scanlines are decoration.
- With reduced motion there is no flicker or glitch.