Package-level declarations

The bouncy glass UI kit, drawn with Compose modifiers and Canvas.

Functions

Link copied to clipboard
fun Avatar(name: String, color: Color, modifier: Modifier = Modifier, size: Dp = 40.dp, ring: Color = Color.White)

Canvas avatar: a gradient disc in the player's colour with their initial.

Link copied to clipboard
fun BouncyButton(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, color: Color = LocalPalette.current.accent, glyph: Glyph? = null, enabled: Boolean = true, compact: Boolean = false)

Slim pill button. A solid color gets a gradient face and a coloured glow beneath; a translucent colour (e.g. palette.surfaceHi) renders as glass.

Link copied to clipboard
fun Modifier.bouncyClick(enabled: Boolean = true, onClick: () -> Unit): Modifier

Squash on press, overshoot on release.

Link copied to clipboard
fun CanvasSlider(value: Float, range: ClosedFloatingPointRange<Float>, onChange: (Float) -> Unit, modifier: Modifier = Modifier, color: Color = LocalPalette.current.accent, onFinished: () -> Unit = {})

Canvas slider with a bouncy thumb.

Link copied to clipboard
fun CanvasSwitch(checked: Boolean, onChange: (Boolean) -> Unit, modifier: Modifier = Modifier)

Canvas toggle with a springy knob that squashes as it travels.

Link copied to clipboard
fun CelebrationOverlay(item: Celebration?, onDismiss: () -> Unit, onPlay: (ArcadeGame) -> Unit)

Full-screen celebration for a freshly earned medal: dim scrim, rotating sunburst in the medal's colours, the medal bouncing in, and a tap anywhere to continue.

Link copied to clipboard
fun Centered(modifier: Modifier = Modifier, content: @Composable BoxScope.() -> Unit)
Link copied to clipboard
fun ColorSwatches(colors: List<Long>, selected: Long, onSelect: (Long) -> Unit, modifier: Modifier = Modifier, dotSize: Dp = 34.dp)

Row of colour dots; the selected one gets a springy ring.

Link copied to clipboard
fun DrawScope.drawGlass(palette: Palette, radius: Float, fill: Color = palette.surface, border: Color = palette.outline)

Frosted glass: translucent fill, a soft top sheen and a hairline border.

Link copied to clipboard
fun IconBubble(glyph: Glyph, onClick: () -> Unit, modifier: Modifier = Modifier, tint: Color = LocalPalette.current.text, active: Boolean = false, size: Dp = 44.dp, label: String? = null)

Round glass icon button.

Link copied to clipboard
fun MedalTile(medal: Medal, count: Int, modifier: Modifier = Modifier)

Cabinet tile: medal art, name, and either its count or what it takes to earn it.

Link copied to clipboard
fun NameField(value: String, onChange: (String) -> Unit, placeholder: String, modifier: Modifier = Modifier, onDone: () -> Unit = {})
Link copied to clipboard
fun onColor(fill: Color): Color

Readable foreground for a solid fill.

Link copied to clipboard
fun Panel(modifier: Modifier = Modifier, color: Color = LocalPalette.current.surface, contentPadding: PaddingValues = PaddingValues(18.dp), highlight: Color? = null, content: @Composable ColumnScope.() -> Unit)

Frosted glass card.

Link copied to clipboard
fun Modifier.popIn(delayMs: Int = 0): Modifier

Springy entrance: scale + fade in after delayMs. Stagger lists by index for a cascade.

Link copied to clipboard
fun QrCode(content: String, color: Color, modifier: Modifier = Modifier)

QR code rendered on Canvas as rounded dots, with the three finder eyes drawn as soft squares. No backing card: on dark themes the dots are light (an inverted QR, which scanners read).

Link copied to clipboard
fun QrScanner(accept: (String) -> Boolean, onResult: (String) -> Unit, onClose: () -> Unit)

Full-screen QR scanner. Asks for the camera only when opened; hands the first decoded text that accept likes to onResult.

Link copied to clipboard
fun RollingNumber(value: Int, style: TextStyle, color: Color, modifier: Modifier = Modifier)

A number that rolls up/down with a bounce whenever it changes.

Link copied to clipboard
fun RoundAction(glyph: Glyph, label: String, onClick: () -> Unit, color: Color, modifier: Modifier = Modifier, size: Dp = 76.dp, emphasized: Boolean = false)

Big round action (home screen): a glass ring around a bright disc holding a coloured icon, with a label underneath. emphasized adds a slow pulsing halo.

Link copied to clipboard
fun SectionLabel(text: String, modifier: Modifier = Modifier)
Link copied to clipboard
fun <T> Segmented(options: List<T>, selected: T, label: (T) -> String, onSelect: (T) -> Unit, modifier: Modifier = Modifier, accent: Color = LocalPalette.current.accent)

Segmented picker: glass track with a glowing thumb that stretches as it travels.

Link copied to clipboard
fun StreakMeter(title: String, current: Int, best: Int, target: Int, nextMedal: Medal, cold: Boolean, modifier: Modifier = Modifier)

A streak gauge: one segment per game up to the next medal. Filled segments glow along the heat ramp (or the cold ramp for a losing streak) and flicker harder the closer the medal is.

Link copied to clipboard
fun ToggleRow(glyph: Glyph, title: String, subtitle: String?, checked: Boolean, onChange: (Boolean) -> Unit)
Link copied to clipboard
fun TopBar(title: String, onBack: () -> Unit, modifier: Modifier = Modifier, actions: @Composable RowScope.() -> Unit = {})

Top bar: round back button, centred title, optional actions on the right.

Link copied to clipboard
fun Txt(text: String, style: TextStyle = Type.body, color: Color = LocalPalette.current.text, modifier: Modifier = Modifier, align: TextAlign? = null, maxLines: Int = Int.MAX_VALUE)

Plain text in the current palette.