@molecule/app-section-divider-solid

Feature · section-divider · App (browser) · v1.1.2 · Apache-2.0

Centered-label section divider ("OR", "Today") with flanking lines

npm install @molecule/app-section-divider-solid

npm · Source on GitHub

How it works

@molecule/app-section-divider-solid 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.

import { SectionDivider } from '@molecule/app-section-divider-solid'

<SectionDivider>OR</SectionDivider>

<SectionDivider align="start">Today</SectionDivider>

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid horizontal divider with optional centered label — the Solid 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 JSX — 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.ts JSDoc, not this file.

Quick Start

import { SectionDivider } from '@molecule/app-section-divider-solid'

<SectionDivider>OR</SectionDivider>

<SectionDivider align="start">Today</SectionDivider>

Type

feature

Installation

npm install @molecule/app-section-divider-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

SectionDividerProps

Props accepted by the SectionDivider component.

interface SectionDividerProps {
  /** Centered label text. Translate it upstream. */
  children?: JSX.Element
  /** 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.

This is the Solid counterpart of @molecule/app-section-divider-react: the same props (React names), the same ClassMap tokens, and the same DOM for the same input. align positions 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 currentColor at 20% opacity, so they inherit the local text color in both light and dark themes.

function SectionDivider(props: SectionDividerProps): JSX.Element
  • props — Component props (see SectionDividerProps).

Returns: The rendered section divider.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid

  • @molecule/app-ui

  • @molecule/app-ui-solid

  • solid-js

  • Requires a bonded ClassMap (cm.flex on the frame, cm.flex1 on the lines) — rendering throws otherwise. No i18n dependency (the label is your own JSX — translate it upstream).

  • align positions 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 currentColor at 20% opacity, so they inherit the local text color in both light and dark themes.