Every button is the comic hit key. KeyPop sits inside one and pops a small SFX the first time it is pressed on a page view, then leaves. It is the one client leaf of the comic kit.
Example#
Usage#
Use KeyPop inside an action key to pop a small SFX the first time someone presses it on a page view: POW! by default. The key itself is the Button, which is already the comic hit key at every volume.
- Inside a Button, as a child; the Button never imports it.
- Once per page view, never at Quiet, never under reduced motion.
wordchanges the SFX; it passescheckSfxlike any other.
Layer and volume#
The key looks the same at every volume and register. KeyPop: never at Quiet; Studio and up once per page view.
Anatomy#
- Hit keyThe Button, unchanged. The pop is hidden until the first press, at the key's top end, aria-hidden.
.mk-button
Volume#
Quiet
Studio
Press
Rave
Content#
- Short, happy SFX words: POW!, BAM!, TADA!
Do and don't#
Do
Don't
A KeyPop on a "Delete the draft" key.
Accessibility#
aria-hidden; the key's label stays the literal action.- Reduced motion: no pop. It dispatches
mk:sfx(kindpress) for the sound bus.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
word | string | "POW!" | One SFX word (default "POW!"). |
Tokens#
System tokens (9)
Changelog#
Arrived in 0.1.0.
- The print and comic kits, P0 (21 P2-T11 to P2-T15): the art core (seeded halftone, bursts, balloons, lines, krackle, printer's marks, SFX layers, the texture tiles and
gen-print-tiles), the print kit (Halftone,Overprint,PrinterMarks,Sticker,Stamp,Seal,useStampLand,Tape,Grain,Misregistrationand the.mk-ovsecond ink,GiantGlyph,ShapeGlyph), the dataCover(grid and score,coverAlt,CoverLegend), the comic registers and kit (Panel,PanelGrid,Balloon,Caption,CornerBox,EditorsNote,ContinuedIn,SFX,SfxBurst,SpeedLines,FocusLines,ImpactStar,KeyPop).