ink-divider
Version:
Divider component for Ink
59 lines • 1.37 kB
TypeScript
import { type BoxProps, type TextProps } from 'ink';
/**
* Props for the Divider component.
*/
export interface DividerProps {
/**
* Title shown in the middle of the divider.
*
* @default null
*/
title?: string;
/**
* Width of the divider.
*
* @default 'auto'
*/
width?: 'auto' | number;
/**
* Padding at the start and the end of the divider.
*
* @default 0
*/
padding?: number;
/**
* Padding besides the title in the middle.
*
* @default 1
*/
titlePadding?: number;
/**
* Color of the title.
*
* @default 'white'
*/
titleColor?: TextProps['color'];
/**
* Char used as a divider.
*
* @default '─'
*/
dividerChar?: string;
/**
* Color of the divider's border. Matches the type of `borderColor` in the Ink `Box` component.
* Accepts standard Ink color names or hex codes.
*
* @default 'gray'
*/
dividerColor?: BoxProps['borderColor'];
boxProps?: BoxProps;
}
/**
* A horizontal divider component styled as a single border line.
*
* @param props - Properties to customize the divider.
* @returns A styled Ink `Box` component representing a divider.
*/
declare const Divider: React.FC<DividerProps>;
export default Divider;
//# sourceMappingURL=index.d.ts.map