Skip to content

kunalkandepatil/style-logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

style-logs banner

˗ˏˋ Style Logs ´ˎ˗

Bring your terminal to life with a simple, CSS-like syntax. Effortlessly create vibrant logs featuring gradients, rainbows, badges, and animations directly inside your template literals.

NPM Version NPM Downloads NPM License GitHub Repo stars


style-logs features

📄 Documentation

╰┈1️⃣ Quick Start

npm install style-logs
const { log } = require("style-logs");

log(`{color: red; bold}Hello World!{/}`);

≪ ◦ ✦ ◦ ≫

╰┈2️⃣ Preview

Run this -> Example

style-logs features



≪ ◦ ✦ ◦ ≫

╰┈3️⃣ Features

1. The Magic Syntax

Use curly braces {} to style text. It's like CSS for your console.

log(`{color: cyan}I am Cyan!{/}`);
log(`{bg: yellow; color: black}Warning!{/}`);
log(`{bold; underline}Important Text{/}`);

2. Gradients & Rainbows

Why settle for one color?

// Two color gradient
log(`{gradient: red, blue}This looks amazing!{/}`);

// Full spectrum rainbow
log(`{rainbow; bold}Taste the rainbow!{/}`);

3. Badges & Borders

Perfect for status messages.

log(`{badge: success} Success {/} {badge: error} Failed {/}`);

log(`{border: green}
  Everything is inside
  a nice green box!
{/}`);

4. Animations

Bring your logs to life.

const { animate } = require("style-logs");

// Typewriter effect
await animate.typewriter("{color: green}Wake up, Neo...{/}");

// Glitch effect
await animate.glitch("{color: red}System Failure{/}");

// Looping Rainbow
const loop = animate.rainbow("Party Time!", { loop: true });
// Stop it later
loop.stop();

5. AI Features

Building an AI tool? We got you.

// Thinking spinner
await animate.thinking("AI is thinking...", promise, { frames: "dots" });

// Stream text like ChatGPT
await animate.stream("Here is the generated response...");

🎧 Support Server

support server

About

Design your console in HTML style.

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published