@molecule/app-section-divider-react
v1.0.2
Published
Centered-label section divider ("OR", "Today") with flanking lines
Readme
@molecule/app-section-divider-react
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Horizontal divider with optional centered label.
Exports <SectionDivider>.
Quick Start
import { SectionDivider } from '@molecule/app-section-divider-react'
<SectionDivider>OR</SectionDivider>
<SectionDivider align="start">Today</SectionDivider>Type
feature
Installation
npm install @molecule/app-section-divider-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/reactAPI
Interfaces
SectionDividerProps
Props accepted by the {@link SectionDivider} component.
interface SectionDividerProps {
/** Centered label text. */
children?: ReactNode
/** Where to align the label. Defaults to `'center'`. */
align?: 'start' | 'center' | 'end'
/** Extra classes. */
className?: string
}Functions
SectionDivider(props)
Horizontal divider with an optional centered label, common as "OR" between auth options, "Today" between feed days, "—" between sections.
function SectionDivider({ children, align = 'center', className }: SectionDividerProps): JSX.Elementprops— Component props (see {@link SectionDividerProps}).
Injection Notes
Requirements
Peer dependencies:
@molecule/app-react^1.0.1@molecule/app-ui^1.0.1@molecule/app-ui-react^1.0.1react^18.0.0 || ^19.0.0
Runtime Dependencies
@molecule/app-react@molecule/app-ui@molecule/app-ui-reactreactRequires a bonded ClassMap (
setClassMap()at startup) — rendering throws otherwise. No i18n dependency (the label is your own ReactNode — translate it upstream).alignpositions the label:'center'(default) draws lines on both sides;'start'/'end'put the label at that edge with a single line filling the rest.Lines use
currentColorat 20% opacity, so they inherit the local text color in both light and dark themes.
