All Projects → mohebifar → Konsul

mohebifar / Konsul

A react renderer for browser's dev console

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Konsul

Filter Console
Filter out unwanted `console.log()` output
Stars: ✭ 203 (-66.45%)
Mutual labels:  console, devtools, browser
Colorette
Easily set the color and style of text in the terminal.
Stars: ✭ 1,047 (+73.06%)
Mutual labels:  console, browser
Console.md
Ever dreamed of rendering Markdown in the console? No. Neither had I.
Stars: ✭ 24 (-96.03%)
Mutual labels:  console, browser
Web Console
Simple web-based shell, remote shell in your browser
Stars: ✭ 1,344 (+122.15%)
Mutual labels:  console, browser
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (-80.33%)
Mutual labels:  devtools, browser
Secret Agent
The web browser that's built for scraping.
Stars: ✭ 151 (-75.04%)
Mutual labels:  devtools, browser
Tiza
Console styling for browsers
Stars: ✭ 74 (-87.77%)
Mutual labels:  console, browser
Vscode Browse Lite
🚀 An embedded browser in VS Code
Stars: ✭ 134 (-77.85%)
Mutual labels:  devtools, browser
debug.js
Debugger of JavaScript, by JavaScript, for JavaScript
Stars: ✭ 19 (-96.86%)
Mutual labels:  console, devtools
Console Badge
🎨 Create simple badges in the browser console
Stars: ✭ 130 (-78.51%)
Mutual labels:  console, browser
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+82.98%)
Mutual labels:  console, browser
Rawkit
🦊 Immediately Open Chrome DevTools when debugging Node.js apps
Stars: ✭ 306 (-49.42%)
Mutual labels:  devtools, browser
Leash
Browser Shell
Stars: ✭ 108 (-82.15%)
Mutual labels:  console, browser
Log
Console.log with style.
Stars: ✭ 2,766 (+357.19%)
Mutual labels:  console, devtools
Frontendwingman
Frontend Wingman, Learn frontend faster!
Stars: ✭ 315 (-47.93%)
Mutual labels:  console, devtools
Bowser
a browser detector
Stars: ✭ 5,006 (+727.44%)
Mutual labels:  browser
Mapscii
🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows
Stars: ✭ 5,886 (+872.89%)
Mutual labels:  console
Termcolor
Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force.
Stars: ✭ 533 (-11.9%)
Mutual labels:  console
Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (-12.07%)
Mutual labels:  console
Uxss Db
🔪Browser logic vulnerabilities ☠️
Stars: ✭ 565 (-6.61%)
Mutual labels:  browser

Konsul Logo

Konsul is an abstraction of the browser's console that comes with a React renderer. It offers text styling, images, style inheritance, buttons with click interaction, etc. inside the browsers dev console.

See the live demo here

Travis npm js-semistandard-style

Usage

With react

Install konsul and react-konsul using npm:

npm install konsul react-konsul react

The following code demonstrates how you can use konsul with react.

import createKonsul from 'konsul';
import renderToKonsul from 'react-konsul';

// Create an instance of konsul
const konsul = createKonsul();

// Render react elements to the browser console!
renderToKonsul(<text style={{ color: 'red', fontWeight: 'bold' }}>Hello world!</text>, konsul);

This is what the result will look like:

Konsul "Hello world" example

See more examples here with the live demo.

React element types

text

This node is the only node type that accepts strings and numbers as children.

Prop Type Description
style TextStyle A plain javascript object whose keys are camel cased property names with their property value.
children `(Text string

image

A Konsul node for displaying images from a url.

Prop Type Description
style ImageStyle A plain javascript object whose keys are camel cased property names with their property value.
source string The URL of the image.

button

An interactive node that responds to clicks. Note that it only works on chrome for now.

Prop Type Description
onClick function Called when the user clicks on the element.
label string The label of the button. It will replace all the characters that are not acceptable for the name of a function with _.

group

All the children of a Group element will be wrapped inside console.group.

Prop Type Description
children Node[] All kind of elements except strings and numbers are accepted.

container

This node has no specific behaviour. It works as a container and renders all its children.

Prop Type Description
children Node[] All kind of elements except strings and numbers are accepted.

Without react

Install konsul via npm:

npm install konsul

The following code is the previous example but without react:

import createKonsul from 'konsul';

// Create an instance of konsul
const konsul = createKonsul();

// Create a text
const text = konsul.text({
  style: {
    color: 'red',
    fontWeight: 'bold'
  }
});

// Append a text to the text element
text.append('Hello world!');

// Append the text element to konsul
konsul.append(text);

// Render to console. The subsequent renders will occur automatically for example by updating the style or children.
konsul.render();

License

Released under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].