suiss/ui · Component
Marker
An inline annotation for timelines and conversations, such as a date divider or system event.
Marker is an open-source component from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
Marker displays a short line of secondary text, typically between messages or list entries. Put the text in MarkerContent and, optionally, a leading MarkerIcon.
The variant prop changes the treatment: plain text, text centered between two separator rules, or text above a bottom border. Use Marker for annotations within content; use Separator for a purely visual rule with no text.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies and add the
cnhelper:
- Copy the source into
components/ui/marker.tsx:
- Update the import paths to match your project.
Usage
Links inside the marker or its content are underlined automatically. The underlying element can be changed:
Marker is built on Base UI's useRender, so it accepts a render prop to change the underlying element.
Set asChild on Marker and pass the element as the child.
Pass a render function to Marker that returns the element with the props it receives.
Examples
Variants
The default, separator and border variants stacked for comparison.
Separator
Text centered between two horizontal rules, as used for a date divider.
With icon
Markers with a leading decorative icon in the default and separator variants.
With link
A marker whose content includes an inline link.
API Reference
Marker
The container row that applies the variant styling.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "separator" | "border" | "default" | Sets the visual treatment: default for plain text, separator for text between two rules, or border for text above a bottom border. |
Also accepts the props of useRender.ComponentProps<"div">.
MarkerIcon
A decorative icon slot shown before the content and hidden from assistive technology.
Also accepts the props of React.ComponentProps<"span">.
MarkerContent
Holds the marker text and any inline links.
Also accepts the props of React.ComponentProps<"span">.
Accessibility
MarkerIconsetsaria-hidden="true", so icons must be decorative; put meaningful text inMarkerContent.- Links inside the content remain in the normal tab order.
Notes
- Styling hooks:
data-slot="marker",data-slot="marker-icon"anddata-slot="marker-content". The root also exposesdata-variant. - Rules and borders use the
bordercolor; text usesmuted-foregroundand links hover toforeground.

Marker is a row of secondary text with an optional icon. It has three variants: default for a plain row, separator for centered text with a line on each side, and border for a row with a bottom border.
Use separator for date dividers in a chat or feed, border for section headings, and default for short notices.
Installation
The CLI also adds what it builds on: Icon, Text.
Manual
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Put the text in MarkerContent and an Icon in MarkerIcon. Text and icons inside the marker pick up the text-muted-foreground color and size through context.
Pass a render element to Marker to render it as another component instead of a View.
API Reference
Marker
Row that sets the variant and the text and icon styles.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "separator" | "border" | "default" | default, separator or border. |
render | RenderProp<Record<string, unknown>, Record<string, never>> | - | Element to render in place of the default View. |
Also accepts the props of ViewProps.
MarkerIcon
Fixed-size slot for an icon.
Also accepts the props of ViewProps.
MarkerContent
Marker text, centered in the separator variant.
Also accepts the props of React.ComponentProps<typeof Text>.
Accessibility
MarkerIconand the separator lines are hidden from screen readers, so only the text is read.- If the icon carries meaning, include it in the text.
Notes
- Text uses
text-sm text-muted-foregroundand iconssize-4. - Lines and the bottom border use
bg-borderandborder-border. - Light and dark colors follow the system appearance.
