Mark
A static text-highlight wrapper that renders a styled <mark> element with a warm background. HTML gives <mark> one job: text marked for reference, because it matters in another context, such as the words of a quote that the paragraph around it discusses, or what changed in a revised text. For words that are important or stressed in their own sentence, <strong> and <em> are the elements.
Mark vs. Highlight:
<x-wirekit::wraps text the author chose to highlight — you decide where themark> <mark>goes.<x-wirekit::takes ahighlight> queryprop and dynamically wraps every occurrence of the query inside the slot — for search-result highlighting where matching positions are runtime-determined. Use Mark for a passage the author marks for reference, Highlight for query/search-match rendering.
Basic Usage
The clause reads: “Either party may cancel with thirty days’ notice, in writing.” The notice period is the part that changed.
Multiple Highlights
Refunds are issued within 14 days of the return, to the original payment method.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
scope |
string|null | null |
Scoped personalization name |
Accessibility
- The
<mark>element is exposed to assistive technology as a mark. Whether a screen reader says so depends on the screen reader and its settings, so where the marking carries meaning a listener needs, say it in the words as well, as the first example does. - The marking is a background, the warm
--color-wk-warning-bg, behind text in--color-wk-text. A preset that changes either token changes the contrast of every mark, so check the pair when you retint them.
Keyboard Interaction
This component is purely presentational and does not respond to keyboard input.
Design Tokens
| Token | Used for |
|---|---|
--color-wk-warning-bg |
Highlight background (warm yellow) |
--color-wk-text |
Text color |
--radius-wk-sm |
Border radius |