Mark
Data DisplayInline text highlight for search results and annotations.
Renders a <mark> element with a customizable background color (default: Neo Green at 20% opacity). Use for search term highlighting or to draw attention to key phrases.
Usage
import { Mark } from "nosible-ux"
export default function Example() {
return (
<p>Signal confidence of <Mark>92%</Mark> exceeds the alert threshold.</p>
)
}Examples
Search highlight
Apple reported strong earnings, beating consensus estimates by 5.1%.
Accessibility
<mark> is the semantic HTML element for highlighted/relevant text. Screen readers may announce it depending on browser. Include surrounding context so the highlighted text is meaningful.
Props
| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | The text content to highlight. |
color | string | undefined | "rgba(38, 208, 124, 0.2)" (neo-green at 20%) | Background color for the highlight. |