Lynx

Divider

A component that serves as a visual separator and is used to clearly divide sections between content.

Engine ≥ 3.6
Available since@seed-design/lynx-react@0.5.0, @seed-design/lynx-css@0.8.1
Loading Lynx example…

Installation

npm install @seed-design/lynx-react @seed-design/lynx-css

Lynx Divider is provided directly from the @seed-design/lynx-react package without a separate ui:divider snippet.

Props

Prop

Type

style?CSSProperties | undefined
className?string | undefined

Usage

import { Divider } from "@seed-design/lynx-react";
<Divider />

Screen Reader Behavior

Divider is included in the accessibility tree by default and passes accessibility-role-description="separator". Screen readers read the element as a separator.

If Divider is a decorative element without semantic meaning, specify accessibility-element={false} to prevent screen readers from reading it.

Examples

Orientation

When using orientation="vertical", the parent must define the height of the divider.

Loading Lynx example…

Inset

inset adds 16px spacing at both ends of the divider.

Loading Lynx example…

Web Version Differences

  • Renders Lynx native <view> instead of HTML <hr>.
  • Supports color, thickness, orientation, inset same as web.
  • Lynx accessibility attributes use accessibility-* format instead of Web's ARIA attributes.
  • Like React version, it is provided via package export and does not provide Registry snippet.

Unsupported Lynx Features

  • Lynx does not have polymorphic rendering for <hr>, <div>, <li>, so the Web Divider's as prop is not provided.
  • It lacks implicit separator semantics of <hr>. Adjust accessibility exposure by using accessibility-role-description and accessibility-element that the component passes by default.

Table of contents