Marker
Marker labels a point in a list, feed or message stream with muted text and an optional icon. Use it for dates, edit notes and progress updates. For a rule with no label, use Separator.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Composition
Examples
Separator
Center the label between two rules to divide a feed by date or event.
Border
Underline each row with a rule to separate steps in a log.
This example also needs:
With icon
Lead the label with a decorative icon in any variant.
This example also needs:
Status
Set role="status" so screen readers announce progress as it changes, without moving focus.
This example also needs: Spinner.
In context
Place markers between message rows to show dates and edits.
This example also needs:
As child link
Render the marker as a link with asChild to make the row clickable.
This example also needs:
Props
Marker
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Renders the child element, such as a heading, link or button, with Marker styles. A link or button child gets hover styles with no extra classes. A |
variant | "default" | "separator" | "border" | null | "default" | No description |
MarkerContent
MarkerContent adds no props of its own; it accepts the props of the element or primitive it wraps.
MarkerIcon
MarkerIcon adds no props of its own; it accepts the props of the element or primitive it wraps.
Marker labels a point in a list, feed or message stream with muted text and an optional icon. Use it for dates, edit notes and progress updates. For a rule with no label, use Separator.
Installation
Install the following dependencies:
Copy and paste the following code into your project.
components/marker/Marker.vue components/marker/MarkerContent.vue components/marker/MarkerIcon.vue components/marker/index.ts Keep each file at the path shown above it.
Paths are relative to
packages/vue/src/. Keep the same folders under your@/root, and the imports between files work without edits.
Usage
Examples
Separator
Center the label between two rules to divide a feed by date or event.
Border
Underline each row with a rule to separate steps in a log.
This example also needs:
With icon
Lead the label with a decorative icon in any variant.
This example also needs:
Status
Set role="status" so screen readers announce progress as it changes, without moving focus.
This example also needs: Spinner.
In context
Place markers between message rows to show dates and edits.
This example also needs:
As child link
Render the marker as a link with as-child to make the row clickable.
This example also needs:
Props
Marker
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "separator" | "border" | null | "default" | No description |
MarkerContent
MarkerContent adds no props of its own; it accepts the props of the element or primitive it wraps.
MarkerIcon
MarkerIcon adds no props of its own; it accepts the props of the element or primitive it wraps.