Magoo Component UI logo Magoo Component UI
← Catalog

Coverage Toggle Row

coverage-toggle-row molecule experimental

A row for adding or removing an insurance coverage, with a name, optional description and price, and a state switch.

Also in: Forms

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

Roadside assistance

24/7 towing and lockout help.

+$8/mo
NotIncluded

Rental car cover

A courtesy car while yours is repaired.

+$5/mo

Props

NameTypeReq
name string ✓
description string
price string
included boolean

Related components

How to use

Set name and, optionally, description and price for the coverage, and included for the starting state. The switch reads role="switch" with data-state driving both its colour and the knob position via Tailwind data-attribute variants. behavior.js flips data-state on click, keeps aria-checked in sync, and dispatches a bubbling "coverage:toggle" event with detail { name, included } so a parent can recompute the premium. The portable self-init reads the coverage name from data-name.

Use cases

list-itemformrow WCAG AA SEO 25 dir: both ai-generated