On this page

Marker

Live examples of Marker, with the exact Vue file that renders each one.

Every example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.

Days in a log

variant="separator": a line on each side of the label.

Today

09:12 Synced 120 orders from the online store

08:40 Updated stock for 36 products

Yesterday

17:05 Synced 98 orders from the online store

MarkerSeparator.vue
<script setup lang="ts">
import { Marker, MarkerContent } from '@/components/ui/marker'

// Day markers in a sync activity log. The separator variant draws a line on each side of the label.
const days = [
  { day: 'Today', events: ['09:12 Synced 120 orders from the online store', '08:40 Updated stock for 36 products'] },
  { day: 'Yesterday', events: ['17:05 Synced 98 orders from the online store'] },
]
</script>

<template>
  <div class="grid w-full max-w-md gap-(--bh-space-150)">
    <template v-for="group in days" :key="group.day">
      <Marker variant="separator">
        <MarkerContent>{{ group.day }}</MarkerContent>
      </Marker>
      <p v-for="event in group.events" :key="event" class="m-0 [font:var(--bh-font-body-default)] text-(--bh-color-text)">
        {{ event }}
      </p>
    </template>
  </div>
</template>

The default variant: an icon, a sentence and a link to act on it.

09:10 Synced 14 orders from the online store

An admin paused order sync at 09:12. Open sync settings
MarkerEvent.vue
<script setup lang="ts">
import { CirclePause } from '@lucide/vue'
import { Marker, MarkerContent, MarkerIcon } from '@/components/ui/marker'

// An event between messages or log lines: an icon, a short sentence and a link to act on it.
</script>

<template>
  <div class="grid w-full max-w-md gap-(--bh-space-150)">
    <p class="m-0 [font:var(--bh-font-body-default)] text-(--bh-color-text)">09:10 Synced 14 orders from the online store</p>
    <Marker>
      <MarkerIcon><CirclePause /></MarkerIcon>
      <MarkerContent>An admin paused order sync at 09:12. <a href="#sync-settings">Open sync settings</a></MarkerContent>
    </Marker>
  </div>
</template>

The start of a section

variant="border": a label with a line under it.

Earlier this week

Mon 09:00 Imported 1,204 customers to the CRM

Mon 08:30 Connected the ERP

MarkerSection.vue
<script setup lang="ts">
import { Marker, MarkerContent } from '@/components/ui/marker'

// The border variant starts a section of a list with a label and a line under it.
const older = ['Mon 09:00 Imported 1,204 customers to the CRM', 'Mon 08:30 Connected the ERP']
</script>

<template>
  <div class="grid w-full max-w-md gap-(--bh-space-150)">
    <Marker variant="border">
      <MarkerContent>Earlier this week</MarkerContent>
    </Marker>
    <p v-for="event in older" :key="event" class="m-0 [font:var(--bh-font-body-default)] text-(--bh-color-text)">
      {{ event }}
    </p>
  </div>
</template>