0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
When to use <input type=number> vs data-stepper vs <stepper-wc> for numeric and step-through inputs.
Three tiers of stepper-style input. Pick the lowest tier that does the job — the higher tiers cost more JS and only earn their weight when the lower one cannot reach the use case.
Decision rule: if <input type="number" data-stepper> works,
use it. Reach for <stepper-wc> only when you hit a case the native input
cannot represent.
Tier 1 — native <input type="number">
The browser primitive. Smallest payload, full form participation, validation, and a numeric soft-keyboard on mobile. The downside is the UA-rendered spinner buttons, which differ across browsers and are tiny for touch.
Reach for this when you do not need consistent buttons across browsers.
Tier 2 — data-stepper
VB's progressive upscale of <input type="number">. Wraps the input with VB-styled +/- buttons, hides the UA spinners, handles step math without floating-point drift, and disables the buttons at min / max. No new element — same form behaviour, same validation, same value semantics. See the data-stepperattribute reference for details.
This handles the bread-and-butter cases: cart quantity, settings inputs, scoring tools, basic numeric forms. If your value is a plain number, this is the right tier.
Tier 3 — <stepper-wc>
<stepper-wc> is for values the native number input cannot represent at all. Four cases:
Formatted units — $5.00, 12px, 50%, durations (15:00), byte sizes (2.05 KB). The native input rejects non-numeric characters, so locale-aware Intl.NumberFormat output and unit suffixes belong here.
Token-snap scales — step through a curated list (data-values="0,4,8,12,16,24") instead of arithmetic. Useful for design-system spacing or type scales.
Discrete enums — step through labeled options like S / M / L / XL or low / medium / high / critical. Not a number at all.
Long-press acceleration — opt in via data-accelerate for large ranges where multiple taps would be tedious.
What if I need vertical, large, or compact steppers?
Those are visual variants of the same primitive, not different primitives. Add them to data-stepper first (e.g. data-stepper-orient="vertical", data-stepper-size="lg") so the cheaper tier benefits too. Don’t scaffold a new component for a CSS variant.