Write interactive CLI apps with React
Write interactive CLI apps with React
Package | Description | Version |
---|---|---|
@react-slate/core |
The core functionality and logic. |
https://zamotany.github.io/react-slate/
render
renderFullscreen
renderToString
renderToJson
for await
to continuously render your app using renderToString
or renderToJson
.renderFullscreen
.console
when exiting when in fullscreen mode (renderFullscreen
).NO_COLOR
environment variable.<Progress />
and <Spinner />
components.onLayout
prop.onClick
prop.onWheel
prop.zIndex
).Please check out Roadmap for in-progress and planned features.
<Text>
component.yarn add react @react-slate/core
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 />);