# XWUIGameBuildingStability

A compact structural-integrity readout: a labeled "Stability" bar whose fill width is `stability / maxStability` and whose color and status badge reflect `data.status` (`stable`, `warning`, or `critical`). Seed it with `data.stability`, `data.maxStability`, and `data.status`; toggle the inline percentage with `conf_comp.showPercentage` and the green/yellow/red theming with `conf_comp.colorCoding`. Call `updateData({ stability, maxStability, status })` to re-fill the bar and re-label the badge live, and `getPercentage()` to read the current value.

## Basic Usage

Shows a color-coded stability bar with a percentage and a status badge.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Structural integrity bar colored by stable/warning/critical status with a percentage readout.
```

## Damage Over Time

Steps the bar from stable down to critical with successive `updateData()` calls as the structure takes damage.

```example
file: examples/DamageOverTime.ts
html: examples/BasicUsage.html
title: Damage Over Time
description: Animates the stability bar from stable through warning to critical via updateData().
```

## Status Comparison

Shows the stable, warning, and critical color states side by side in three bars.

```example
file: examples/StatusComparison.ts
html: examples/BasicUsage.html
title: Status Comparison
description: Three stability bars contrasting the stable, warning, and critical color and badge states.
```

```api
```
