Magoo Component UI logo Magoo Component UI
← Catalog

Demand Response Banner

demand-response-banner molecule experimental

A tinted banner announcing a grid demand response event, with an urgency level, a reward, and opt in / opt out actions.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

A peak demand event is expected this evening. Reduce usage between 4 and 7 PM to earn credits.

Today, 4:00 - 7:00 PM

Earn $2/kWh saved

You are opted in to this event. You have opted out of this event.
Urgent

Grid emergency in effect. Please cut non-essential usage now to help prevent outages.

Active until 8:30 PM

Earn $5/kWh saved

You are opted in to this event. You have opted out of this event.

Props

NameTypeReq
message string ✓
event_time string
level enum (info | warning | urgent)
reward string

Related components

How to use

Layout and the tint are pure CSS from the level variant class. behavior.js wires the two buttons: clicking Opt in or Opt out sets data-state on the root, and group-data variants hide the actions and reveal the matching confirmation line. The portable self init reads no props; the initial data-state="prompt" lives in the markup, and a demand-response:change event bubbles on each choice.

Use cases

bannerhighlight WCAG AA SEO 40 dir: both ai-generated