Skip to content
Calm motion: animations on this site only fade, with no movement

Scene buttons ​

Buttons that set many devices at once, such as Night or Away

A scene is a saved set of states for many devices. One tap starts it. For one device, use the device tile.

Basic
  • scenes is a list of scenes. Each scene has an id and a name, and an optional icon and description.
  • A click emits run with the id. Your app then sets the devices.
  • v-model is the id of the scene that runs now. Its button is pressed and filled with the text color.
  • After a click, a hidden status line says that the scene is on.
  • Change the words with labels or a label pack: title and started (a function).

Usage ​

ts
import { BlessSceneButtons } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
scenes*BlessScene[]—
labelsPartial<{ title: string; started: (name: string) => string; }>—
modelValuestring—the id of the scene that runs now

Events

NamePayloadDescription
update:modelValue[value: string | undefined]
run[id: string]

Released under the MIT License. Character names and artwork belong to their owners.