ZeroGravity UI

Scenesstable

Ricochet

Short text built from destructible pixel blocks, with breakout or shooter play.

404

knock the text apart

Customize

Scenewhat gets knocked apart
text
game
variant
26pixelSize
Breakoutball and bonuses
1.00speed
powerUps
0.050powerUpChance
Shootership and bolts
1.00shotSpeed
5fireRate
1.00shipSpeed
Lookcolours and start-up
color
ballColor
paddleColor
autoStart
hideCursor

Usage

TSX
import { Ricochet } from "zerogravity"

<Ricochet />

Generated from the controls above. Only props that differ from their defaults are shown.

Props

18 documented props on Ricochet
PropertyTypeDefaultDescription
textstring"404"Text.
game"breakout" | "shooter""breakout"Game.
variant"neon" | "mono" | "soft""neon"Variant.
pixelSizenumber26Pixel size. Range 8 to 48.
speednumber1Ball speed. Range 0.4 to 2.5.
powerUpsbooleantruePower-ups.
powerUpChancenumber0.05Drop chance. Range 0 to 0.5.
shotSpeednumber1Shot speed. Range 0.4 to 3.
fireRatenumber5Fire rate. Range 1 to 14.
shipSpeednumber1Ship speed. Range 0.4 to 3.
colorstring"#f6a94b"Blocks.
ballColorstring"#fdf3e3"Ball.
paddleColorstring"#6fd6e8"Paddle or ship.
autoStartbooleantrueAuto start.
hideCursorbooleantrueHide cursor.
onClear() => void—Fires once, when the last block is destroyed.
interactivebooleantruePointer, keyboard and focus handling.
respectReducedMotionbooleantrueRender the text standing still when the user asks for less motion.

Dependencies

0 external runtime dependencies

Ships with nothing but React.