Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

Heading

<Heading> draws a title over the world with the same white and thin dark edge as Text, at one of four levels. The level picks the element, h1 to h4, and a default size and weight from shadcn’s typography scale:

level element size and weight
1 h1 text-4xl font-extrabold, balanced
2 h2 text-3xl font-semibold
3 h3 text-2xl font-semibold
4 h4 text-xl font-semibold

Every level draws with tracking-tight. A Modal draws its title as a level 2 Heading.

Its props are in Heading.

import { Hud, Panel, Slot, Heading, Text } from "@spawnite/engine";
export function Wave({ number }: { number: number }) {
return (
<Hud>
<Panel slot={Slot.Top}>
<Heading level={1}>Wave {number}</Heading>
<Text>Hold the gate</Text>
</Panel>
</Hud>
);
}

There is no size prop: the level is the default, and a className such as text-2xl is the override that shows in the diff.