@je-es/style
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@je-es/style

A utility for styling text output, providing customizable formatting options such as foreground and background colors, text attributes, padding, borders, width, and alignment.

  • 📥 Usage

    npm i @je-es/style
  • 🌟 Syntax

    import { style } from '@je-es/style';
    
    style('Hello World',
    {
        fg      ?: t_color,     // string('name' | '#hex') | array[r,g,b]
        bg      ?: t_color,     // ...
        attr    ?: t_attr,      // string | string [],
    
        prefix  ?: t_prefix,    // { val : string, fg ?: t_color, bg ?: t_color }
        suffix  ?: t_prefix,    // ...
    
        padding ?: t_padding,   // { top, bottom, right, left }
        border  ?: t_border,    // { width ?: number, fg ?: t_color, bg ?: t_color }
    
        align   ?: t_align      // 'center' | 'right' | 'left'
    
        width   ?: number,
    })

Documentation


Made with ❤ by Maysara Elshewehy

Package Sidebar

Install

npm i @je-es/style

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

59.6 kB

Total Files

9

Last publish

Collaborators

  • maysara-ecs