xonecas.io
70160
Ce

cel-tui / files

cel-tui / packages / components / README.md

800 bytes
1# @cel-tui/components
2
3Reusable components and managed view utilities for
4[cel-tui](https://github.com/sacenox/cel-tui).
5
6```bash
7bun add @cel-tui/components @cel-tui/core
8```
9
10The package includes:
11
12- `Button`, `Divider`, `VDivider`, and `Spacer`
13- TextInput-backed `Select`
14- variable-height `VirtualList`
15- lifecycle-managed `Spinner` and `createTicker`
16- `Markdown` and streaming-capable `SyntaxHighlight`
17
18```ts
19import { Select } from "@cel-tui/components";
20
21const fruitSelect = Select({
22  items: ["apple", "banana", "cherry"],
23  onSelect: (value) => console.log(value),
24});
25
26// Call inside cel.viewport().
27fruitSelect();
28```
29
30Stateful factories return callable instances with explicit lifecycle or state
31methods. The package ships TypeScript source and composes only public cel-tui
32primitives.