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…
<border-wc> draws one of 34 decorative border effects around its content, using SVG, canvas or layered CSS that a plain border cannot produce. It names no Vanilla Breeze tokens itself: it uses the text color and corner radius it inherits, and you pass theme tokens in through its custom properties.
Which border to draw. An unknown name draws nothing.
color
Any CSS color
currentColor
Color of the strokes or particles. A few effects, such as neon and ticket, use a color of their own when this is left at the default.
thickness
Number of pixels
2
Stroke width.
speed
Number of milliseconds
1000
Length of the animation.
radius
Number of pixels
The element's own computed border-radius
Corner radius of the drawn border.
animate
Boolean
off
Plays the effect's entrance or looping animation.
mode
Depends on the effect
Depends on the effect
A variant of the effect. neon accepts synthwave; barber accepts warning, candy and racing; marquee accepts chase, sparkle and random.
motion
auto, reduce, force
auto
auto follows the reader's reduced-motion setting. reduce always draws a still border. force always animates.
trigger
time, scroll
time
For draw only: reveal the border on a timer, or as the element scrolls into view.
eager
Boolean
off
Apply the effect as soon as the element is added. By default the element waits until it is within 200 pixels of the viewport, and removes the effect again when it leaves.
The binder applies the same 34 effects to any element that carries data-border-effect, and watches the page for elements that are added, changed or removed. The attribute may hold several space-separated values; the binder uses the first one it knows and ignores the rest. Options come from the --border-wc-* custom properties.
The module also exports bindBorderEffects(root), which scans a subtree on demand, and stopWatching(), which stops the binder from reacting to later page changes.
border-wc does not name any Vanilla Breeze token. It picks up the theme through three things it reads from the page.
What it reads
Where Vanilla Breeze sets it
Drives
The inherited text color (currentColor)
--color-text, or whatever color applies to the element
Default stroke color.
The element's computed border-radius
Any rule you write, for example with --radius-m
Default corner radius of the drawn border.
data-motion-reduced on <html>
The Vanilla Breeze motion setting
Still borders in place of animated ones.
For color, thickness, speed and radius the element uses the first of these that has a value: the --border-wc-* property, then the attribute, then the built-in default. To follow the theme, point the properties at Vanilla Breeze tokens, for all borders or for one.
The element reads these values when it draws the effect. If a theme switch changes them, call refresh() to redraw.
border-wc or data-border-effect
Vanilla Breeze has its own CSS-only data-border-effectattribute with six values: spin, pulse, march, hue-cycle, breathe and trace. Use those for light, always-on motion that needs no script. Use border-wc when you need an effect that CSS alone cannot draw.
The two share the attribute without conflict. The border-wc binder ignores the six Vanilla Breeze values, and Vanilla Breeze's CSS has no rules for the 34 border-wc names.
Accessibility
Reduced motion. With motion="auto", the default, effects draw without animation when the operating system asks for reduced motion, and also when Vanilla Breeze's own setting puts data-motion-reduced on <html>. If either changes while the page is open, the effect is drawn again to match.
Overriding.motion="reduce" forces a still border. motion="force" animates regardless of the reader's setting, so keep it for content where the motion is the point.
Pointer and keyboard. The drawn layer ignores pointer events and takes no focus. Links and controls inside the element work as usual.