Skip to content

Stepper ​

<stepper-box name="d" value="-5" min="-400" max="400" random> -- an integer in a sentence, with ◀ ▶ to step to the next value its domain admits and, with random, a die for a random one. A tangle-style control: it reads as the number, and binds _d like any other. A StringTemplate hole sets domain from the variable's declaration, Where included.

packages/components/src/stepper-box.ts

Props

PropTypeDefaultNotes
namestring""reflects
valuenumber0reflects
minnumber-100
maxnumber100
randombooleanfalseOffer a random value from the domain.

As a web component

Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <stepper-box> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.

Settable only as a JS property, not an attribute -- domain: bind with :domain.prop="…" directly on the tag.