# XWUIGameSpellbook

A categorized spell browser that renders `data.spells` as an icon grid alongside a detail panel for the selected spell. Filter tabs come from `conf_comp.categories` or, when omitted, the distinct `school` values found in the data - an "All" tab plus per-school tabs filter the grid. Unlearned spells (`learned: false`) render dimmed, and the detail panel shows school, description, and meta (cost in MP, cooldown in seconds, level) gated by `showSchool`, `showCost`, and `showCooldown`. Drive it with `selectSpell()`, `filterBySchool()`, `onSelectSpell()`, and `updateData()`. Use it on a caster's character screen to browse, filter, and inspect known and learnable abilities.

## Basic Usage

Constructs an `XWUIGameSpellbook` with empty data and default config, so it mounts an empty grid (no spells, no school tabs) with cost, cooldown, and school display all enabled.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: An XWUIGameSpellbook mounted with default config and no spells, ready to be populated via updateData().
```

## Arcane Grimoire

A mage's grimoire across three schools whose filter tabs are driven explicitly by `conf_comp.categories` for a stable Arcane/Fire/Frost tab order.

```example
file: examples/ArcaneGrimoire.ts
html: examples/ArcaneGrimoire.html
title: Arcane Grimoire
description: A three-school spellbook with explicit category tabs, learned starters, and higher-level locked spells.
```

## Icon Only Grid

A lore-focused spellbook with `showCost` and `showCooldown` both `false`, dropping the MP and cooldown badges to keep only school and flavour text.

```example
file: examples/IconOnlyGrid.ts
html: examples/IconOnlyGrid.html
title: Icon Only Grid
description: A codex-style spellbook that hides rotation numbers and surfaces only school labels and descriptions.
```

```api
```
