Overview
LabeledSeparator composes Separator and Text into a named horizontal divider. Your application supplies the label and surrounding spacing.
Usage
Label placement and tone
labelPosition defaults to center, with a line on each side of the label. Use end to place the label after the leading line. The label accepts a string supplied and localized by your application.
tone defaults to neutral. Use danger for a red marker with a medium-weight label and a thicker rule. Set hasStartMarker to add a small decorative cap at the beginning of the rule.
The optional cap follows the shared calendar and chat line design.
Spacing and application state
The component fills its container and adds no outer margin. Use parent layout spacing or nativestyle and className for margins and alignment. Keep offsets for adjacent avatars or calendar positions in your application.
The component presents the supplied label. Your application decides where an unread boundary or calendar marker belongs and when it is visible.
Accessibility and composition
The root exposes one horizontal separator named from its label. The rule segments and optional start marker are decorative, so assistive technology does not announce extra separators. Native accessible attributes can provide a different name or description when needed. Native attributes, styles, class names, andref target the outer div. Use render to compose another noninteractive element while forwarding the supplied props and ref. LabeledSeparatorProps is exported from twenty-ui/components/layout.
Migration
Replace the frontendLabeledDivider with LabeledSeparator. Rename textPosition to labelPosition, and use tone="danger" for the unread marker’s red appearance. Remove noMargin, since outer margins default to zero. Preserve the former default spacing with style={{ marginBlock: 'var(--t-spacing-3)' }} where needed.
Props
Allows you to replace the component’s HTML element
with a different tag, or compose it with another component.Accepts a
ReactElement or a function that returns the element to render.