From eeef2ac71eefc951cd14e9b5587e48278a8fd8be Mon Sep 17 00:00:00 2001 From: msmps <7691252+msmps@users.noreply.github.com> Date: Mon, 19 Jan 2026 21:54:55 +0000 Subject: [PATCH] feat: initial commit --- LICENSE | 21 + README.md | 88 +++ command/opentui.md | 74 +++ install.sh | 82 +++ skill/opentui/SKILL.md | 196 ++++++ skill/opentui/references/animation/README.md | 424 +++++++++++++ skill/opentui/references/components/README.md | 140 +++++ .../references/components/code-diff.md | 378 ++++++++++++ .../references/components/containers.md | 400 +++++++++++++ skill/opentui/references/components/inputs.md | 531 +++++++++++++++++ .../references/components/text-display.md | 384 ++++++++++++ skill/opentui/references/core/README.md | 145 +++++ skill/opentui/references/core/api.md | 520 ++++++++++++++++ .../opentui/references/core/configuration.md | 166 ++++++ skill/opentui/references/core/gotchas.md | 393 ++++++++++++ skill/opentui/references/core/patterns.md | 448 ++++++++++++++ skill/opentui/references/keyboard/README.md | 458 ++++++++++++++ skill/opentui/references/layout/README.md | 337 +++++++++++ skill/opentui/references/layout/patterns.md | 412 +++++++++++++ skill/opentui/references/react/README.md | 174 ++++++ skill/opentui/references/react/api.md | 414 +++++++++++++ .../opentui/references/react/configuration.md | 299 ++++++++++ skill/opentui/references/react/gotchas.md | 432 ++++++++++++++ skill/opentui/references/react/patterns.md | 498 ++++++++++++++++ skill/opentui/references/solid/README.md | 201 +++++++ skill/opentui/references/solid/api.md | 495 ++++++++++++++++ .../opentui/references/solid/configuration.md | 313 ++++++++++ skill/opentui/references/solid/gotchas.md | 415 +++++++++++++ skill/opentui/references/solid/patterns.md | 558 ++++++++++++++++++ skill/opentui/references/testing/README.md | 415 +++++++++++++ 30 files changed, 9811 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 command/opentui.md create mode 100644 install.sh create mode 100644 skill/opentui/SKILL.md create mode 100644 skill/opentui/references/animation/README.md create mode 100644 skill/opentui/references/components/README.md create mode 100644 skill/opentui/references/components/code-diff.md create mode 100644 skill/opentui/references/components/containers.md create mode 100644 skill/opentui/references/components/inputs.md create mode 100644 skill/opentui/references/components/text-display.md create mode 100644 skill/opentui/references/core/README.md create mode 100644 skill/opentui/references/core/api.md create mode 100644 skill/opentui/references/core/configuration.md create mode 100644 skill/opentui/references/core/gotchas.md create mode 100644 skill/opentui/references/core/patterns.md create mode 100644 skill/opentui/references/keyboard/README.md create mode 100644 skill/opentui/references/layout/README.md create mode 100644 skill/opentui/references/layout/patterns.md create mode 100644 skill/opentui/references/react/README.md create mode 100644 skill/opentui/references/react/api.md create mode 100644 skill/opentui/references/react/configuration.md create mode 100644 skill/opentui/references/react/gotchas.md create mode 100644 skill/opentui/references/react/patterns.md create mode 100644 skill/opentui/references/solid/README.md create mode 100644 skill/opentui/references/solid/api.md create mode 100644 skill/opentui/references/solid/configuration.md create mode 100644 skill/opentui/references/solid/gotchas.md create mode 100644 skill/opentui/references/solid/patterns.md create mode 100644 skill/opentui/references/testing/README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6cb8096 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 The OpenTUI Skill Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..80be7d7 --- /dev/null +++ b/README.md @@ -0,0 +1,88 @@ +# OpenTUI Skill for OpenCode + +OpenTUI platform reference docs. Covers the Core imperative API, React reconciler, Solid reconciler, layout system, components, keyboard handling, animations, and testing. + +## Install + +Local installation (current project only): + +```bash +curl -fsSL https://raw.githubusercontent.com/msmps/opentui-skill/main/install.sh | bash +``` + +Global installation (available in all projects): + +```bash +curl -fsSL https://raw.githubusercontent.com/msmps/opentui-skill/main/install.sh | bash -s -- --global +``` + +## Usage + +Once installed, the skill appears in OpenCode's `` list. The agent loads it automatically when working on OpenTUI tasks. + +Use the `/opentui` command to load the skill and get contextual guidance: + +``` +/opentui create a React TUI with keyboard navigation +``` + +### Updating + +To update to the latest version: + +``` +/opentui --update-skill +``` + +## Structure + +The installer adds both a skill and a command: + +``` +# Skill (reference docs) +skill/opentui/ +├── SKILL.md # Main manifest + decision trees +└── references/ # Framework and concept subdirectories + ├── core/ # Imperative API (5-file pattern) + ├── react/ # React reconciler (5-file pattern) + ├── solid/ # Solid reconciler (5-file pattern) + ├── components/ # Component categories + ├── layout/ # Yoga/Flexbox layout + ├── keyboard/ # Input handling + ├── animation/ # Timeline animations + └── testing/ # Test renderer + snapshots + +# Command (slash command) +command/opentui.md # /opentui entrypoint +``` + +### Decision Trees + +The main `SKILL.md` contains decision trees for: +- Choosing a framework (Core, React, Solid) +- Displaying content (text, containers, code, diffs) +- Handling user input (inputs, keyboard, focus) +- Layout and positioning (flexbox, absolute, responsive) +- Animations (timeline, easing, transitions) +- Testing (snapshots, interaction, debugging) +- Troubleshooting (gotchas, common issues) + +## Topics Covered + +**Frameworks**: Core (imperative), React (declarative), Solid (fine-grained reactivity) + +**Components**: text, box, scrollbox, input, textarea, select, tab-select, ascii-font, code, line-number, diff + +**Cross-cutting**: Layout (Yoga/Flexbox), Keyboard handling, Animations, Testing + +## Credits & Inspiration + +This skill's structure and patterns are heavily inspired by: + +- **[cloudflare-skill](https://github.com/dmmulroy/cloudflare-skill)** by [Dillon Mulroy](https://github.com/dmmulroy) — an excellent example of a platform skill, demonstrating decision trees, progressive disclosure, and the multi-file reference pattern. + +- **[Anatomy of an Excellent OpenCode Skill](https://jpcaparas.medium.com/anatomy-of-an-excellent-opencode-skill-lessons-from-cloudflare-skill-0f853babc471)** by [JP Caparas](https://medium.com/@jpcaparas) — an insightful breakdown of what makes cloudflare-skill effective, covering context management, troubleshooting indexes, and intent-based routing. + +## License + +MIT - see [LICENSE](LICENSE) diff --git a/command/opentui.md b/command/opentui.md new file mode 100644 index 0000000..0a78e31 --- /dev/null +++ b/command/opentui.md @@ -0,0 +1,74 @@ +--- +description: Load OpenTUI skill and get contextual guidance for building terminal user interfaces +--- + +Load the OpenTUI TUI framework skill and help with any terminal user interface development task. + +## Workflow + +### Step 1: Check for --update-skill flag + +If $ARGUMENTS contains `--update-skill`: + +1. Determine install location by checking which exists: + - Local: `.opencode/skill/opentui/` + - Global: `~/.config/opencode/skill/opentui/` + +2. Run the appropriate install command: + ```bash + # For local installation + curl -fsSL https://raw.githubusercontent.com/msmps/opentui-skill/main/install.sh | bash + + # For global installation + curl -fsSL https://raw.githubusercontent.com/msmps/opentui-skill/main/install.sh | bash -s -- --global + ``` + +3. Output success message and stop (do not continue to other steps). + +### Step 2: Load opentui skill + +``` +skill({ name: 'opentui' }) +``` + +### Step 3: Identify task type from user request + +Analyze $ARGUMENTS to determine: +- **Framework needed** (Core imperative, React declarative, Solid declarative) +- **Task type** (new project setup, component implementation, layout, keyboard handling, debugging, testing) + +Use decision trees in SKILL.md to select correct reference files. + +### Step 4: Read relevant reference files + +Based on task type, read from `references//`: + +| Task | Files to Read | +|------|---------------| +| New project setup | `/README.md` + `/configuration.md` | +| Implement components | `/api.md` + `components/.md` | +| Layout/positioning | `layout/README.md` + `layout/patterns.md` | +| Handle keyboard input | `keyboard/README.md` | +| Add animations | `animation/README.md` | +| Debug/troubleshoot | `/gotchas.md` + `testing/README.md` | +| Write tests | `testing/README.md` | +| Understand patterns | `/patterns.md` | + +### Step 5: Execute task + +Apply OpenTUI-specific patterns and APIs from references to complete the user's request. + +### Step 6: Summarize + +``` +=== OpenTUI Task Complete === + +Framework: +Files referenced: + + +``` + + +$ARGUMENTS + diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..9e7bd2f --- /dev/null +++ b/install.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +set -euo pipefail + +REPO_URL="https://github.com/msmps/opentui-skill.git" +SKILL_NAME="opentui" + +usage() { + cat </` contains: + +| File | Purpose | When to Read | +|------|---------|--------------| +| `README.md` | Overview, when to use, quick start | **Always read first** | +| `api.md` | Runtime API, components, hooks | Writing code | +| `configuration.md` | Setup, tsconfig, bundling | Configuring a project | +| `patterns.md` | Common patterns, best practices | Implementation guidance | +| `gotchas.md` | Pitfalls, limitations, debugging | Troubleshooting | + +Cross-cutting concepts in `./references//` have `README.md` as the entry point. + +### Reading Order + +1. Start with `README.md` for your chosen framework +2. Then read additional files relevant to your task: + - Building components -> `api.md` + `components/.md` + - Setting up project -> `configuration.md` + - Layout/positioning -> `layout/README.md` + - Troubleshooting -> `gotchas.md` + `testing/README.md` + +### Example Paths + +``` +./references/react/README.md # Start here for React +./references/react/api.md # React components and hooks +./references/solid/configuration.md # Solid project setup +./references/components/inputs.md # Input, Textarea, Select docs +./references/core/gotchas.md # Core debugging tips +``` + +### Runtime Notes + +OpenTUI runs on Bun and uses Zig for native builds. Read `./references/core/gotchas.md` for runtime requirements and build guidance. + +## Quick Decision Trees + +### "Which framework should I use?" + +``` +Which framework? +├─ I want full control, maximum performance, no framework overhead +│ └─ core/ (imperative API) +├─ I know React, want familiar component patterns +│ └─ react/ (React reconciler) +├─ I want fine-grained reactivity, optimal re-renders +│ └─ solid/ (Solid reconciler) +└─ I'm building a library/framework on top of OpenTUI + └─ core/ (imperative API) +``` + +### "I need to display content" + +``` +Display content? +├─ Plain or styled text -> components/text-display.md +├─ Container with borders/background -> components/containers.md +├─ Scrollable content area -> components/containers.md (scrollbox) +├─ ASCII art banner/title -> components/text-display.md (ascii-font) +├─ Code with syntax highlighting -> components/code-diff.md +├─ Diff viewer (unified/split) -> components/code-diff.md +└─ Line numbers with diagnostics -> components/code-diff.md +``` + +### "I need user input" + +``` +User input? +├─ Single-line text field -> components/inputs.md (input) +├─ Multi-line text editor -> components/inputs.md (textarea) +├─ Select from a list (vertical) -> components/inputs.md (select) +├─ Tab-based selection (horizontal) -> components/inputs.md (tab-select) +└─ Custom keyboard shortcuts -> keyboard/README.md +``` + +### "I need layout/positioning" + +``` +Layout? +├─ Flexbox-style layouts (row, column, wrap) -> layout/README.md +├─ Absolute positioning -> layout/patterns.md +├─ Responsive to terminal size -> layout/patterns.md +├─ Centering content -> layout/patterns.md +└─ Complex nested layouts -> layout/patterns.md +``` + +### "I need animations" + +``` +Animations? +├─ Timeline-based animations -> animation/README.md +├─ Easing functions -> animation/README.md +├─ Property transitions -> animation/README.md +└─ Looping animations -> animation/README.md +``` + +### "I need to handle input" + +``` +Input handling? +├─ Keyboard events (keypress, release) -> keyboard/README.md +├─ Focus management -> keyboard/README.md +├─ Paste events -> keyboard/README.md +├─ Mouse events -> components/containers.md +└─ Text selection -> components/text-display.md +``` + +### "I need to test my TUI" + +``` +Testing? +├─ Snapshot testing -> testing/README.md +├─ Interaction testing -> testing/README.md +├─ Test renderer setup -> testing/README.md +└─ Debugging tests -> testing/README.md +``` + +### "I need to debug/troubleshoot" + +``` +Troubleshooting? +├─ Runtime errors, crashes -> /gotchas.md +├─ Layout issues -> layout/README.md + layout/patterns.md +├─ Input/focus issues -> keyboard/README.md +└─ Repro + regression tests -> testing/README.md +``` + +### Troubleshooting Index + +- Terminal cleanup, crashes -> `core/gotchas.md` +- Text styling not applying -> `components/text-display.md` +- Input focus/shortcuts -> `keyboard/README.md` +- Layout misalignment -> `layout/README.md` +- Flaky snapshots -> `testing/README.md` + +For component naming differences and text modifiers, see `components/README.md`. + +## Product Index + +### Frameworks +| Framework | Entry File | Description | +|-----------|------------|-------------| +| Core | `./references/core/README.md` | Imperative API, all primitives | +| React | `./references/react/README.md` | React reconciler for declarative TUI | +| Solid | `./references/solid/README.md` | SolidJS reconciler for declarative TUI | + +### Cross-Cutting Concepts +| Concept | Entry File | Description | +|---------|------------|-------------| +| Layout | `./references/layout/README.md` | Yoga/Flexbox layout system | +| Components | `./references/components/README.md` | Component reference by category | +| Keyboard | `./references/keyboard/README.md` | Keyboard input handling | +| Animation | `./references/animation/README.md` | Timeline-based animations | +| Testing | `./references/testing/README.md` | Test renderer and snapshots | + +### Component Categories +| Category | Entry File | Components | +|----------|------------|------------| +| Text & Display | `./references/components/text-display.md` | text, ascii-font, styled text | +| Containers | `./references/components/containers.md` | box, scrollbox, borders | +| Inputs | `./references/components/inputs.md` | input, textarea, select, tab-select | +| Code & Diff | `./references/components/code-diff.md` | code, line-number, diff | + +## Resources + +**Repository**: https://github.com/anomalyco/opentui +**Core Docs**: https://github.com/anomalyco/opentui/tree/main/packages/core/docs +**Examples**: https://github.com/anomalyco/opentui/tree/main/packages/core/src/examples +**Awesome List**: https://github.com/msmps/awesome-opentui diff --git a/skill/opentui/references/animation/README.md b/skill/opentui/references/animation/README.md new file mode 100644 index 0000000..35bbd04 --- /dev/null +++ b/skill/opentui/references/animation/README.md @@ -0,0 +1,424 @@ +# Animation System + +OpenTUI provides a timeline-based animation system for smooth property transitions. + +## Overview + +Animations in OpenTUI use: +- **Timeline**: Orchestrates multiple animations +- **Animation Engine**: Manages timelines and rendering +- **Easing Functions**: Control animation curves + +## When to Use + +Use this reference when you need timeline-driven animations, easing curves, or progressive transitions. + +## Basic Usage + +### React + +```tsx +import { useTimeline } from "@opentui/react" +import { useEffect, useState } from "react" + +function AnimatedBox() { + const [width, setWidth] = useState(0) + + const timeline = useTimeline({ + duration: 2000, + }) + + useEffect(() => { + timeline.add( + { width: 0 }, + { + width: 50, + duration: 2000, + ease: "easeOutQuad", + onUpdate: (anim) => { + setWidth(Math.round(anim.targets[0].width)) + }, + } + ) + }, []) + + return ( + + ) +} +``` + +### Solid + +```tsx +import { useTimeline } from "@opentui/solid" +import { createSignal, onMount } from "solid-js" + +function AnimatedBox() { + const [width, setWidth] = createSignal(0) + + const timeline = useTimeline({ + duration: 2000, + }) + + onMount(() => { + timeline.add( + { width: 0 }, + { + width: 50, + duration: 2000, + ease: "easeOutQuad", + onUpdate: (anim) => { + setWidth(Math.round(anim.targets[0].width)) + }, + } + ) + }) + + return ( + + ) +} +``` + +### Core + +```typescript +import { createCliRenderer, Timeline, engine } from "@opentui/core" + +const renderer = await createCliRenderer() +engine.attach(renderer) + +const timeline = new Timeline({ + duration: 2000, + autoplay: true, +}) + +timeline.add( + { x: 0 }, + { + x: 50, + duration: 2000, + ease: "easeOutQuad", + onUpdate: (anim) => { + box.setLeft(Math.round(anim.targets[0].x)) + }, + } +) + +engine.addTimeline(timeline) +``` + +## Timeline Options + +```typescript +const timeline = useTimeline({ + duration: 2000, // Total duration in ms + loop: false, // Loop the timeline + autoplay: true, // Start automatically + onComplete: () => {}, // Called when timeline completes + onPause: () => {}, // Called when timeline pauses +}) +``` + +## Timeline Methods + +```typescript +// Add animation +timeline.add(target, properties, startTime?) + +// Control playback +timeline.play() // Start/resume +timeline.pause() // Pause +timeline.restart() // Restart from beginning + +// State +timeline.progress // Current progress (0-1) +timeline.duration // Total duration +``` + +## Animation Properties + +```typescript +timeline.add( + { value: 0 }, // Target object with initial values + { + value: 100, // Final value + duration: 1000, // Animation duration in ms + ease: "linear", // Easing function + delay: 0, // Delay before starting + onUpdate: (anim) => { + // Called each frame + const current = anim.targets[0].value + }, + onComplete: () => { + // Called when this animation completes + }, + }, + 0 // Start time in timeline (optional) +) +``` + +## Easing Functions + +Available easing functions: + +### Linear + +| Name | Description | +|------|-------------| +| `linear` | Constant speed | + +### Quad (Power of 2) + +| Name | Description | +|------|-------------| +| `easeInQuad` | Slow start | +| `easeOutQuad` | Slow end | +| `easeInOutQuad` | Slow start and end | + +### Cubic (Power of 3) + +| Name | Description | +|------|-------------| +| `easeInCubic` | Slower start | +| `easeOutCubic` | Slower end | +| `easeInOutCubic` | Slower start and end | + +### Quart (Power of 4) + +| Name | Description | +|------|-------------| +| `easeInQuart` | Even slower start | +| `easeOutQuart` | Even slower end | +| `easeInOutQuart` | Even slower start and end | + +### Expo (Exponential) + +| Name | Description | +|------|-------------| +| `easeInExpo` | Exponential start | +| `easeOutExpo` | Exponential end | +| `easeInOutExpo` | Exponential start and end | + +### Back (Overshoot) + +| Name | Description | +|------|-------------| +| `easeInBack` | Pull back, then forward | +| `easeOutBack` | Overshoot, then settle | +| `easeInOutBack` | Both | + +### Elastic + +| Name | Description | +|------|-------------| +| `easeInElastic` | Elastic start | +| `easeOutElastic` | Elastic end (bouncy) | +| `easeInOutElastic` | Both | + +### Bounce + +| Name | Description | +|------|-------------| +| `easeInBounce` | Bounce at start | +| `easeOutBounce` | Bounce at end | +| `easeInOutBounce` | Both | + +## Patterns + +### Progress Bar + +```tsx +function ProgressBar({ progress }: { progress: number }) { + const [width, setWidth] = useState(0) + const maxWidth = 50 + + const timeline = useTimeline() + + useEffect(() => { + timeline.add( + { value: width }, + { + value: (progress / 100) * maxWidth, + duration: 300, + ease: "easeOutQuad", + onUpdate: (anim) => { + setWidth(Math.round(anim.targets[0].value)) + }, + } + ) + }, [progress]) + + return ( + + Progress: {progress}% + + + + + ) +} +``` + +### Fade In + +```tsx +function FadeIn({ children }) { + const [opacity, setOpacity] = useState(0) + + const timeline = useTimeline() + + useEffect(() => { + timeline.add( + { opacity: 0 }, + { + opacity: 1, + duration: 500, + ease: "easeOutQuad", + onUpdate: (anim) => { + setOpacity(anim.targets[0].opacity) + }, + } + ) + }, []) + + return ( + + {children} + + ) +} +``` + +### Looping Animation + +```tsx +function Spinner() { + const [frame, setFrame] = useState(0) + const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] + + useEffect(() => { + const interval = setInterval(() => { + setFrame(f => (f + 1) % frames.length) + }, 80) + + return () => clearInterval(interval) + }, []) + + return {frames[frame]} Loading... +} +``` + +### Staggered Animation + +```tsx +function StaggeredList({ items }) { + const [visibleCount, setVisibleCount] = useState(0) + + useEffect(() => { + let count = 0 + const interval = setInterval(() => { + count++ + setVisibleCount(count) + if (count >= items.length) { + clearInterval(interval) + } + }, 100) + + return () => clearInterval(interval) + }, [items.length]) + + return ( + + {items.slice(0, visibleCount).map((item, i) => ( + {item} + ))} + + ) +} +``` + +### Slide In + +```tsx +function SlideIn({ children, from = "left" }) { + const [offset, setOffset] = useState(from === "left" ? -20 : 20) + + const timeline = useTimeline() + + useEffect(() => { + timeline.add( + { offset: from === "left" ? -20 : 20 }, + { + offset: 0, + duration: 300, + ease: "easeOutCubic", + onUpdate: (anim) => { + setOffset(Math.round(anim.targets[0].offset)) + }, + } + ) + }, []) + + return ( + + {children} + + ) +} +``` + +## Performance Tips + +### Batch Updates + +Timeline automatically batches updates within the render loop. + +### Use Integer Values + +Round animated values for character-based positioning: + +```typescript +onUpdate: (anim) => { + setX(Math.round(anim.targets[0].x)) +} +``` + +### Clean Up Timelines + +Hooks automatically clean up, but for core: + +```typescript +// When done with timeline +engine.removeTimeline(timeline) +``` + +## Gotchas + +### Terminal Refresh Rate + +Terminal UIs typically refresh at 60 FPS max. Very fast animations may appear choppy. + +### Character Grid + +Animations are constrained to character cells. Sub-pixel positioning isn't possible. + +### Cleanup in Effects + +Always clean up intervals and timelines: + +```tsx +useEffect(() => { + const interval = setInterval(...) + return () => clearInterval(interval) +}, []) +``` diff --git a/skill/opentui/references/components/README.md b/skill/opentui/references/components/README.md new file mode 100644 index 0000000..c9421c1 --- /dev/null +++ b/skill/opentui/references/components/README.md @@ -0,0 +1,140 @@ +# OpenTUI Components + +Reference for all OpenTUI components, organized by category. Components are available in all three frameworks (Core, React, Solid) with slight API differences. + +## When to Use + +Use this reference when you need to find the right component category or compare naming across Core, React, and Solid. + +## Component Categories + +| Category | Components | File | +|----------|------------|------| +| Text & Display | text, ascii-font, styled text | [text-display.md](./text-display.md) | +| Containers | box, scrollbox, borders | [containers.md](./containers.md) | +| Inputs | input, textarea, select, tab-select | [inputs.md](./inputs.md) | +| Code & Diff | code, line-number, diff | [code-diff.md](./code-diff.md) | + +## Component Chooser + +``` +Need a component? +├─ Styled text or ASCII art -> text-display.md +├─ Containers, borders, scrolling -> containers.md +├─ Forms or input controls -> inputs.md +└─ Code blocks, diffs, line numbers -> code-diff.md +``` + +## Component Naming + +Components have different names across frameworks: + +| Concept | Core (Class) | React (JSX) | Solid (JSX) | +|---------|--------------|-------------|-------------| +| Text | `TextRenderable` | `` | `` | +| Box | `BoxRenderable` | `` | `` | +| ScrollBox | `ScrollBoxRenderable` | `` | `` | +| Input | `InputRenderable` | `` | `` | +| Textarea | `TextareaRenderable` | `