Magoo Component UI logo Magoo Component UI
← Catalog

Device Tile

device-tile molecule experimental

An on/off smart-home device tile with a switch, icon, name, room, and status line.

Also in: Cards

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

Living room lamp

Living room

80% brightness

Off

Bedroom fan

Bedroom

Off

Props

NameTypeReq
name string ✓
room string
icon string
on boolean
status_text string

Related components

How to use

Interactive. The role="switch" button flips on click: it sets data-state (and aria-checked) on the switch, mirrors the new value onto every data-on element so the tile highlight follows, and dispatches a bubbling "device:toggle" CustomEvent whose detail is { on }. Read state from the root's data-on attribute; the component holds no other state.

Use cases

cardgrid WCAG AA SEO 25 dir: both ai-generated