A simplified version of ink
export default function App() {
return (
<Box
width={'100%'}
height={'100%'}
display="flex"
flexDirection="row"
justifyContent="center"
alignItems="center"
>
<Box color="red" text={'hello'} />
<Box color="green" text={'♥'} />
<Box color="blue" text={'world'} />
</Box>
);
}
For more convenient use, please ensure that the running environment contains at least the following APIs
process.stdin.setRawMode
process.stdin.read
process.stdin.addListener("readable", cb)
process.stdin.addListener("data", cb)
process.stdout.rows
process.stdout.columns
process.stdout.write
r-tui-txiki-react r-tui-txiki-solidjs
perf | size | time |
---|---|---|
react | 123K | 40ms |
solid | 32K | 40ms |
- support yoga-wasm-web api
- custom event