Component docs
Loading
"use client";
import { GameOverlay } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
title (required) | ReactNode | — | Title (any content). |
actions | ReactNode | — | Action slot (buttons or links). |
description | ReactNode | — | Supporting text. |
announce | boolean | — | Make the overlay a polite live region (role="status", default false). Leave it off when the game reports state through an always-mounted Announcer (the usual pairing: one message per change, no double reading). A live region mounted together with its text is not announced reliably, so prefer the Announcer for overlays that appear and vanish. |
titlerequiredReactNode
Title (any content).
actionsReactNode
Action slot (buttons or links).
descriptionReactNode
Supporting text.
announceboolean
Make the overlay a polite live region (role="status", default false). Leave it off when the game reports state through an always-mounted Announcer (the usual pairing: one message per change, no double reading). A live region mounted together with its text is not announced reliably, so prefer the Announcer for overlays that appear and vanish.
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
<GameOverlay title="Game over" description="Score: 1280" actions={<Button>Restart</Button>} />