How to use it
- Select a Heading, Basic text or Rich text element and open the Content tab.
- In the Annotation section, choose a Style: Underline, Box, Circle, Highlight, Strike-through, Crossed off or Brackets. The other fields appear once you pick one.
- Under Annotate, choose what to draw on: The whole text (the default), Highlighted words (<mark>),
Bold words or Italic words. For the last three, wrap those words in
<mark>, bold or italic in the text. - Set the Color. If you leave it empty, the stroke uses the element's text color. Highlight uses
#ffe066. - Set Stroke width (px) (1 to 12, default 2) and Draw time (ms) (0 to 5000, default 800).
- Under Draw, choose When scrolled into view (the default) or When the page loads.
- Open the page on the front end. The builder canvas does not show the strokes.
Underline, Strike-through and Highlight draw one stroke per line of text. Box, Circle, Crossed off and Brackets draw one shape around each annotated part: the whole text, or each marked, bold or italic part.
Where it appears in Bricks
Content tab of the Heading, Basic text and Rich text elements, in an Annotation section.
Limits
- Annotations draw on the front end only. The builder canvas renders these elements itself and does not show them.
- Highlight is made for light backgrounds.
- The strokes are decorative. They sit in an SVG hidden from screen readers, and the text itself is not changed.
- Visitors who prefer reduced motion see the strokes drawn without animation.
- The strokes are slightly irregular, and the same element gets the same shape on every load. They redraw when the element changes size.
- An element with
position: staticbecomesposition: relative, so the strokes move with it. For Highlight, Kiln also setsisolation: isolateon the element, so the highlight paints behind the text and above the element's own background. - Elements added after the first load by Bricks (AJAX query results, loaded pages and popups) get their annotations, but only when the module's script is already on the page. An annotated element in the first HTML of the page loads it.
- The script is about 10 KB unminified and uses no library. It loads only on pages with an annotated element.
Settings
None. Turn the module on in Bricks > Kiln (it is on by default).
Requirements
Bricks 2.4 or newer.