# jackin-tui-lookbook (https://jackin.tailrocks.com/reference/crates/jackin-tui-lookbook/)



{/* GENERATED from crates/jackin-tui-lookbook/README.md — edit the README, not this file */}

Interactive component lookbook for `jackin-tui` — the reference rendering of every shared TUI component in its real state. This is where a developer (or agent) copies the canonical API call for a component, and where SVG previews for the docs are generated.

## What this crate owns [#what-this-crate-owns]

* A `story_*()` per component variant, each calling the **public** `render_*()` helper or `Widget::render` exactly as the real surfaces do.
* Interactive `*Interactor` structs that drive a real component `*State` through `handle_key`, matching real-app usage.
* The SVG preview generator that feeds `docs/public/tui-lookbook/`.

## Architecture tier and allowed dependencies [#architecture-tier-and-allowed-dependencies]

**Presentation / dev-tool crate.** Allowed workspace deps: `jackin-tui`. It depends on nothing else because it must call only `jackin-tui`'s public API — that is its whole purpose.

## Structure [#structure]

| Module                                                                                                                                                                | Owns                                   | Tests                                                                                  |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------- |
| <RepoFile path="crates/jackin-tui-lookbook/src/main.rs">`main.rs`</RepoFile>                                                                                          | lookbook runner + `--check` drift gate | —                                                                                      |
| <RepoFile path="crates/jackin-tui-lookbook/src/stories.rs">`stories.rs`</RepoFile> · <RepoFile path="crates/jackin-tui-lookbook/src/stories.rs">`stories/`</RepoFile> | one story per component variant        | <RepoFile path="crates/jackin-tui-lookbook/src/stories/tests.rs">`tests.rs`</RepoFile> |
| <RepoFile path="crates/jackin-tui-lookbook/src/interactors.rs">`interactors.rs`</RepoFile>                                                                            | interactive state drivers              | —                                                                                      |
| <RepoFile path="crates/jackin-tui-lookbook/src/svg.rs">`svg.rs`</RepoFile>                                                                                            | SVG preview rendering for the docs     | —                                                                                      |
| <RepoFile path="crates/jackin-tui-lookbook/src/tests.rs">`tests.rs`</RepoFile>                                                                                        | tests                                  | —                                                                                      |

## Public API [#public-api]

None consumed; this crate is a consumer of `jackin-tui`. Its own surface is the lookbook binary (`cargo run -p jackin-tui-lookbook -- docs/public/tui-lookbook` to regenerate, `-- --check …` to verify no drift).

## How to verify [#how-to-verify]

```sh
cargo nextest run -p jackin-tui-lookbook
cargo run -p jackin-tui-lookbook -- --check docs/public/tui-lookbook
```

The hard rule — *use only `jackin-tui` public API* — applies to every story and interactor.
