SVG Animation
A Bricks element that picks an SVG from the media library and draws its strokes in on hover, on scroll into view, or automatically on load.
Version: 1.1.0 · Requires: PHP 7.4+, Bricks · See the live demo
What it does
- Measures each stroked shape and draws it in. Shapes with no stroke fade in instead.
- Four animation types, easing and duration controls.
- No animation library. The script loads only when the element is used.
Installation
- Upload and activate the plugin. Bricks must be active.
- Your site must allow SVG uploads (the native Bricks SVG element has the same requirement).
- In the Bricks editor search for SVG Animation (Media group) and choose a file in Select SVG File.
Settings
- Select SVG file — Media Library. File only; no pasted code or icon sets.
- Height, Width — CSS length
- Stroke width — Number
- Stroke colour, Fill — Colour
- Draw on hover — Off. Replays on every hover.
- Animate on scroll into view — Off
- Viewport threshold — 0.3 (0 to 1). Scroll option only.
- Animate once — On. Off replays whenever it re-enters the viewport.
- Animation type — Sync (default), Delayed, One by One, Scenario Sync
- Duration (ms) — 1000
- Stagger (ms) — 150. Delayed and One by One only.
- Easing — Ease In Out (default), Linear, Ease, Ease In, Ease Out
- Fill in after drawing — Off. For solid icons: set a stroke colour (the same as the fill) and a thin stroke width. The outline draws first, then the fill fades in.
If neither hover nor scroll is on, the animation plays once on load.
Animation types
- Sync: every path draws together.
- Delayed: paths start staggered with the same duration.
- One by One: each path waits for the previous one.
- Scenario Sync: constant drawing speed, so longer paths take proportionally longer.
Known limits
- Scenario Sync is this plugin’s own interpretation of the term.