Skip to content

Rule

widgetsdisplay

Rule: a horizontal or vertical divider line with an optional centered title

Installation

$ bunx termuijs add rule

Copies the source into src/components/rule/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Rule } from '@termuijs/widgets'
ts
new Rule(style: Partial<Style> = {}, opts: RuleOptions = {})

API Reference

Rule

PropTypeRequiredDescription
orientationRuleOrientationoptionalLine direction
titlestringoptionalTitle centered in the line (horizontal only)
colorColoroptionalLine color
#display#rule