# XWUIGameSpellSlots

A horizontal spell-slot bar (ability hotbar) that pads its `data.slots` array out to `conf_comp.maxSlots` (default 6) and lets the player drag entries from `data.availableSpells` onto a slot to equip them, or click a filled slot to clear it. Filled slots show the spell `icon` and `name`, empty slots show their 1-based number, and a drag hint ("Drag spells to slots • Click to clear") is rendered unless `showDragHint` is false. Drive it programmatically with `assignSpell()`, `clearSlot()`, and `updateData()`. Use it for action-bar setup where players assign abilities to a limited number of cast slots.

## Basic Usage

Constructs an `XWUIGameSpellSlots` with empty data and default config, so the constructor pads `slots` to six empty numbered slots and shows the drag hint.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: An XWUIGameSpellSlots bar auto-padded to the default six empty slots with the drag-to-equip hint shown.
```

## Prefilled Loadout

A hotbar booted from a saved loadout - the first three slots arrive equipped with Fireball, Heal, and Blink while the rest stay draggable.

```example
file: examples/PrefilledLoadout.ts
html: examples/PrefilledLoadout.html
title: Prefilled Loadout
description: A spell bar that starts with three abilities equipped and pads the remaining slots out to maxSlots.
```

## Compact Bar

A minimal four-slot HUD hotbar with `maxSlots: 4` and `showDragHint: false`, leaving a tight always-on action bar.

```example
file: examples/CompactBar.ts
html: examples/CompactBar.html
title: Compact Bar
description: A four-position action bar with the drag hint suppressed for a space-tight always-on HUD.
```

```api
```
