Mark
A mark element for highlighting or emphasizing text inline with customizable styling variants.
Anatomy
<script>
import { Mark } from "@saas-ui/svelte/typography/mark";
</script>
<!-- Basic mark -->
<p>This is <Mark>highlighted</Mark> text.</p>
<!-- With variant -->
<p>This is <Mark variant="solid" colour="blue">important</Mark> text.</p>
<!-- Text style -->
<p>This is <Mark variant="text" colour="red">emphasized</Mark> text.</p>Examples
Basic Accessibility
<Text>
The <Mark>design system</Mark> is a collection of UI elements
</Text> Variants Accessibility
variant prop to change the visual style. Available variants: subtle, solid, text, plain.
<DataList.Root orientation="vertical">
{#each markVariants as variant}
<DataList.Item>
<DataList.ItemLabel>{variant}</DataList.ItemLabel>
<DataList.ItemValue>
<Text>
The <Mark {variant} colour="indigo">design system</Mark>
is a collection of UI elements
</Text>
</DataList.ItemValue>
</DataList.Item>
{/each}
</DataList.Root>Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | subtle | solid | text | plain | subtle | - |
colour | accent | gray | zinc | neutral | stone | slate | red | orange | amber | yellow | lime | green | emerald | teal | cyan | sky | blue | indigo | violet | purple | fuchsia | pink | rose | gray | The colour theme of the component. |
children | any | - | The content to be rendered inside the component. |
class | text | - | Additional CSS classes to apply. |