It's Half-Staff Because...

Embeddable Widget

Add real-time US flag half-staff status to your website with a single line of code.

Basic Usage

Paste this snippet wherever you want the widget to appear:

<script src="https://itshalfstaffbecause.com/widget.js" async></script>

Options

Customize the widget with data- attributes:

AttributeDescriptionExample
data-stateShow status for a specific state (2-letter abbreviation)data-state="CA"
data-themeColor theme: light (default) or darkdata-theme="dark"
data-compactCompact mode: shows only the primary reasondata-compact

Examples

National status (default)

<script src="https://itshalfstaffbecause.com/widget.js" async></script>

Single state (Texas)

<script src="https://itshalfstaffbecause.com/widget.js" data-state="TX" async></script>

Dark theme, compact

<script src="https://itshalfstaffbecause.com/widget.js" data-theme="dark" data-compact async></script>

API

Prefer to build your own UI? Use the JSON API directly:

GET https://itshalfstaffbecause.com/api/v1/widget
GET https://itshalfstaffbecause.com/api/v1/widget?state=CA

Returns JSON with is_half_staff, half_staff_count, and orders array. CORS-enabled for browser requests. Cached for 5 minutes.