Hotbar
The player's hotbar — the 9 × 1 grid — inside a container screen.
Import
import { Hotbar } from '@bedrock-core/ui';
Usage
<Container entity={'core:furnace'} padding={8} gap={6}>
<Text>{'§fFurnace'}</Text>
<Panel flexGrow={1} />
<PlayerInventory alignSelf={'center'} />
<Hotbar alignSelf={'center'} marginTop={4} />
</Container>
The same redrawn grid as PlayerInventory, one row tall: 162 × 18 — a thin SlotGrid wrapper, <SlotGrid collection={'hotbar_items'} columns={9} rows={1} />. Placed by the layout engine at its natural size, and — like the inventory — not drawn unless asked for, because a container screen owns the whole chest screen.
Props
Inherits control props. Its size is fixed by the engine's cell; use alignSelf, margins and the surrounding panel to place it.
Notes
- Vanilla stacks the hotbar four texels under the inventory;
marginTop={4}reproduces that.