zamotany / React Slate
Licence: mit
Write interactive CLI apps with React
Stars: ✭ 385
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to React Slate
Cmd2
cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
Stars: ✭ 342 (-11.17%)
Mutual labels: cli, terminal
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+5056.1%)
Mutual labels: cli, terminal
Tqdm
A Fast, Extensible Progress Bar for Python and CLI
Stars: ✭ 20,632 (+5258.96%)
Mutual labels: cli, terminal
Libterm
iOS sandboxed terminal with Python, Lua and Clang
Stars: ✭ 348 (-9.61%)
Mutual labels: cli, terminal
Caporal.js
A full-featured framework for building command line applications (cli) with node.js
Stars: ✭ 3,279 (+751.69%)
Mutual labels: cli, terminal
Stig
TUI and CLI for the BitTorrent client Transmission
Stars: ✭ 360 (-6.49%)
Mutual labels: cli, terminal
Tsukae
🧑💻📊 Show off your most used shell commands
Stars: ✭ 345 (-10.39%)
Mutual labels: cli, terminal
Haxor News
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Stars: ✭ 3,342 (+768.05%)
Mutual labels: cli, terminal
Cw
The best way to tail AWS CloudWatch Logs from your terminal
Stars: ✭ 368 (-4.42%)
Mutual labels: cli, terminal
Eureka
💡 CLI tool to input and store your ideas without leaving the terminal
Stars: ✭ 316 (-17.92%)
Mutual labels: cli, terminal
Nord Dircolors
An arctic, north-bluish clean and elegant dircolors theme.
Stars: ✭ 328 (-14.81%)
Mutual labels: cli, terminal
Peaclock
A responsive and customizable clock, timer, and stopwatch for the terminal.
Stars: ✭ 314 (-18.44%)
Mutual labels: cli, terminal
Hues
Colored terminal text made easy for Python and happiness.
Stars: ✭ 345 (-10.39%)
Mutual labels: cli, terminal
Pastel
A command-line tool to generate, analyze, convert and manipulate colors
Stars: ✭ 3,742 (+871.95%)
Mutual labels: cli, terminal
Has
✅ checks presence of various command line tools and their versions on the path
Stars: ✭ 309 (-19.74%)
Mutual labels: cli, terminal
Colorls
A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. 🎉
Stars: ✭ 3,896 (+911.95%)
Mutual labels: cli, terminal
Pick
create curses based interactive selection list in the terminal
Stars: ✭ 370 (-3.9%)
Mutual labels: cli, terminal
Write interactive CLI apps with React
Package | Description | Version |
---|---|---|
@react-slate/core |
The core functionality and logic. |
Website & documentation
https://zamotany.github.io/react-slate/
Features
- Render React apps to:
- terminal with
render
- terminal in fullscreen mode with
renderFullscreen
- a string with
renderToString
- a JSON tree
renderToJson
- terminal with
- Use
for await
to continuously render your app usingrenderToString
orrenderToJson
. - Render your app to alternative screen buffer and go back to the previous content upon exit with
renderFullscreen
. - Log messages to main screen buffer with
console
when exiting when in fullscreen mode (renderFullscreen
). - Build layouts with FlexBox (https://github.com/vislyhq/stretch).
- Disable colors with
NO_COLOR
environment variable. - Use standard ANSI colors, RBG, Hex and CSS keywords to style your app.
- Use built-in
<Progress />
and<Spinner />
components. - Get layout information using
onLayout
prop. - Handle clicks using
onClick
prop. - Detect mouse wheel events using
onWheel
prop. - Support for absolute positioning and depth (
zIndex
). - Built with TypeScript.
Please check out Roadmap for in-progress and planned features.
Limitations
- Web components are not compatible.
- Strings must be wrapped in a
<Text>
component.
Installation
yarn add react @react-slate/core
Usage
import React from 'react';
import { render, View, Text } from '@react-slate/core';
function App() {
return (
<View width="100%" flexDirection="row" justifyContent="center">
<Text color="green" bold>Hello world!</Text>
</View>
);
}
render(<App />);
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].