StealThis .dev

DIY — Safety Callout System

A manual-style safety callout system for DIY and maker guides with four severity levels — Danger, Warning, Tip, and Note — each with an icon plate, stencil label, and optional read-more expander. Includes compact inline strips, a dismissible variant remembered via localStorage, numbered-step embedded callouts, a required-PPE variant with icon chips, and a live builder panel that generates copy-ready HTML with a toast confirmation.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Safety Callout System

A complete callout vocabulary for workshop-style manuals, styled with the blueprint-and-kraft maker aesthetic. Four severity levels cover the whole range — red Danger (high-voltage capacitor discharge), amber Warning (hot soldering-iron surface), blue Pro Tip, and a neutral Note — each built from a colored icon plate with an SVG glyph, a stencil-uppercase mono label, a title, and body text. Danger and Warning callouts carry role="alert", and the deeper ones add a smooth “read more” expander for procedures and cool-down notes.

Beyond the standard block, the system ships variants for real guide layouts: compact inline strips for one-line hazards, a dismissible warning whose hidden state is remembered in localStorage (with a restore link), callouts embedded inside a numbered step list with a dashed connector rail, and a safety-orange Required PPE block with hoverable icon chips for goggles, gloves, and respirator.

The live builder panel at the bottom makes the system practical: pick a severity, type a title and body, and the preview re-renders instantly alongside generated, escaped HTML in a blueprint-dark code box. One click copies it to the clipboard with a toast confirmation, using a execCommand fallback when the Clipboard API is unavailable.

Illustrative UI only — always follow real safety guidance when working with tools, electronics, or repairs.