@molecule/app-section-divider-svelte
Feature · section-divider · App (browser) · v1.1.3 · Apache-2.0
Centered-label section divider ("OR", "Today") with flanking lines
npm install @molecule/app-section-divider-svelteHow it works
@molecule/app-section-divider-svelte is a ready-made section-divider feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
<script lang="ts">
import { SectionDivider } from '@molecule/app-section-divider-svelte'
</script>
<SectionDivider>OR</SectionDivider>
<SectionDivider align="start">Today</SectionDivider>Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte
Reference
Svelte horizontal divider with optional centered label — the Svelte
counterpart of @molecule/app-section-divider-react, with the same props
and the same DOM for the same input.
Exports SectionDivider, common as "OR" between auth options, "Today"
between feed days, "—" between sections. The label is your own snippet —
translate it upstream.
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.
Quick Start
<script lang="ts">
import { SectionDivider } from '@molecule/app-section-divider-svelte'
</script>
<SectionDivider>OR</SectionDivider>
<SectionDivider align="start">Today</SectionDivider>
Type
feature
Installation
npm install @molecule/app-section-divider-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
API
Interfaces
SectionDividerProps
Props accepted by the SectionDivider component.
interface SectionDividerProps {
/** Centered label text — the `children` snippet. Translate it upstream. */
children?: Snippet
/** Where to align the label. Defaults to `'center'`. */
align?: 'start' | 'center' | 'end'
/** Extra classes. */
className?: string
}
Constants
SectionDivider
const SectionDivider: LegacyComponentType
Injection Notes
Requirements
Peer dependencies:
@molecule/app-svelte^3.13.0 || ^4.0.0@molecule/app-ui^1.0.1@molecule/app-ui-svelte^1.1.0svelte^5.0.0
Runtime Dependencies
-
@molecule/app-svelte -
@molecule/app-ui -
@molecule/app-ui-svelte -
svelte -
Requires a bonded ClassMap (
cm.flexon the frame,cm.flex1on the lines) — rendering throws otherwise. No i18n dependency (the label is your own snippet — 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.