Slot Tile
Inventory / hotbar slot (tone × state × interactive), holds children.
ui hud
Preview
Installation
npx slintcn@latest add slot-tileUsage
import { SlotTile, SlotTileTone, SlotTileState } from "slintcn/components/slot-tile.slint";
SlotTile {
tone: SlotTileTone.stone;
state: SlotTileState.active;
interactive: true;
// place an icon / Keycap / Badge inside
}
Properties
tone
in
SlotTileTone
Surface tint — `stone`, `iron`, `gold`, etc.
state
in
SlotTileState
Visual state — `idle`, `selected`, `disabled`.
interactive
in
bool
When true, the tile shows hover affordances and emits `clicked`.
size
in
length
Pixel side length of the square tile.
clicked
callback
()
Fired on press release when `interactive` is true.
API
SlotTileTonestoneemptyaccentSlotTileStateidleactivedisabledDependencies
theme only
Installed automatically as transitive dependencies of slintcn add slot-tile.