Reusable Chio views. Supply your state and content; choose presentation options independently of the theme.
Chio styles native SwiftTUI controls. The runtime keeps editing, focus, scrolling and presentation.
Runnable applications composed from Chio views and native SwiftTUI controls, using local demo data.
MapView
Reusable view
Retained vector geography, camera bindings, markers and routes in a native terminal view.
The recording replays fixed OpenFreeMap world and street XYZ tiles over local HTTP through the real MapTileLoader. It demonstrates coverage, loading, retry, annotations and detail changes; static previews show minimal detail. Replay inputs and data credits.
The command below opts into current OpenFreeMap acquisition. Omit --online for bundled offline geography. A writable raw-tile cache reuses fresh responses; immutable tile packs retain offline data without expiry or network fallback.
swift run -c release chio-maps --online --map street
For an offline world pack, run swift run -c release chio-maps --write-tile-pack .build/world.chiomap once, then swift run -c release chio-maps --tile-pack .build/world.chiomap. This uses bundled coarse world tiles and the programmatic pack API; it does not download street data.
Arrow keys pan · + / − zoom · e retries online acquisition · n / p select and center a location · Return activates · Tab moves native focus · [ / ] lower/raise detail · d cycles levels · Space switches world/street · t changes theme · f switches outlines/fills · l toggles labels · r resets · q quits. Minimal is the default; use --detail silhouette, abstract or source to start elsewhere.
Presentation options. Detail: minimal, silhouette, abstract or source. Fills or outlines and labels are separate options; source zoom chooses input resolution, while theme chooses paint.
Render a retained Markdown document with Swift highlighting and optional native link actions.
Swift code keeps its spacing and native horizontal scrolling, with token colors from the theme. Inline links retain native focus and wrapping; the application reports destinations locally. Follow both through light and dark themes and a compact terminal.
Presentation options. Code highlighting: automatic or plain. Links are passive unless you supply an OpenLinkAction; the application decides how to open them.
Chio
MarkdownDocument, MarkdownView, ChioLinkStyle
SwiftTUI
ScrollView, OpenLinkAction and native inline links.
Example code
Report content and local link feedback. Open a report from the dashboard to try it.
agents and capabilities are application-owned Identifiable models with name fields; selection is an optional agent ID and selectedIDs is a set of capability IDs.
Presentation options. Single choice or checked set; fuzzy filtering and enabled-row predicates are supported options. Applications own limits and validation. Filtering preserves checked IDs.
Chio
SearchableList, SearchableChecklist, FormField
SwiftTUI
List, Button and native focus.
Example code
Choice limits, validation rules, and the two-step workflow.
Time-proportional history and measurements with independent target bands and reference markers. Applications supply every observation and its meaning.
Keep source references when the current reading is missing, compare the reading with its target band, and show explicit history breaks. Equal timestamps remain equal. Playback, compact layout and the synthetic data belong to the example.
Presentation options. Annotated bars with zero to two references and an optional target band; automatic or fixed history scale. Captions and marker tracks need their complete allocation.
Present normalized measurements, missing samples and formatted readings without owning collection or clocks.
Advance local samples, switch between bars and segmented target dials, show missing or empty history, and compare segmented readouts and compact border titles across three palettes. Chio presents the readings; the application owns the data and updates.
Presentation options. Gauge: normalized bar, plain dial, or segmented dial with an authored target interval. Reference marks remain available on bars. Readout: segmented or plain. History: automatic or fixed scale; nil readings leave gaps. These choices are independent of theme.
Wrap native editors with consistent labels, help and current validation errors.
Reveal related timing fields, correct an inline error, and save a local snapshot. Cancel restores the latest saved values; native focus and scrolling keep editing available through theme and size changes. No jobs are started.
Navigate a finite item range with native buttons and an immutable Pagination value.
Filter local run history, change rows per page, and navigate finite results with native controls. Empty results and theme changes stay part of the same workflow.
Presentation options. Pagination supplies the item range. Replacing total count can retain/clamp the page; resizing preserves the first item. Reset policy and data loading belong to the application.
Chio
Pagination, PageControl
SwiftTUI
Picker, ScrollView and native buttons.
Example code
Local run history, filtering, and page-size choices.
Format elapsed and remaining durations with the same rounding in plain and segmented lettering.
Chio formats elapsed and remaining time in plain and segmented styles; this example supplies its own clock state and controls. Pause, resume and reset both clocks, then follow countdown expiry through a theme change and a compact terminal.
Share shortcut descriptions between compact hints and an expanded native help presentation.
Press ? while browsing or F1 during editing to open grouped help. Closing returns to the retained control and query; typing ? in search remains text. All run actions update a local counter.
Choose a readable regular file with native search, folder navigation and explicit confirmation.
This capture uses local fixture paths. The runnable example reads directory metadata and displays a chosen path; it does not open file contents or modify files.
Presentation options. Extension filter: all or only specified values. Hidden files are optional. Cancel preserves the prior selection; the starting directory does not restrict navigation. Applications handle opening errors.
Chio
FilePicker, FileExtensionFilter
SwiftTUI
Native state, focus, scrolling and input.
Application
Starting directory, file filter and confirmation/cancellation workflow.
publish() is an application-owned action. This recorded example simulates publishing locally; nothing is sent.
Button("Publish") { publish() }
.style(.default)
Presentation options. The theme installs default native styles. Toasts use explicit ChioToastStyle; applications choose tone and own completion, confirmation and dismissal.
.style(...) installs styles for groups, lists, tables, tabs, palettes, fields, editors, progress, spinners, prompts, buttons, links, pickers, toggles, scrolling and disclosure. See all installed styles · Tabs · Fields & editors · Prompts & toasts.
Theme native scroll indicators while SwiftTUI owns input and retained position.
Explore a wide local event log with native scrolling on both axes. Semantic indicators share the theme, and the position stays with you through a lighter palette and a compact terminal.
Presentation options. Choose horizontal, vertical or both axes and bound their allocation. Native scrollIndicators controls track visibility; a nearer scrollViewStyle overrides the installed style.
.style(...) installs styles for groups, lists, tables, tabs, palettes, fields, editors, progress, spinners, prompts, buttons, links, pickers, toggles, scrolling and disclosure. See all installed styles · Tabs · Fields & editors · Prompts & toasts.
Chio
ChioScrollViewStyle
SwiftTUI
ScrollView, ScrollCellOffset for scrolling and position.
Give native disclosure groups a compact header, focus treatment and indentation.
Native disclosure groups reveal a local example hierarchy. Fold a parent and reopen it to find the nested expansion choices remembered by the application, then change theme and terminal size.
expanded: Bool is an application-owned binding; retain child values outside the group if they must survive collapse.
DisclosureGroup("Details", isExpanded: $expanded) {
Text("Build settings and notes go here.")
}
.style(.default)
Presentation options. Nest groups for authored hierarchies. SwiftTUI owns expansion and geometric focus; the example folder labels are local fixtures and do not read the filesystem.
.style(...) installs styles for groups, lists, tables, tabs, palettes, fields, editors, progress, spinners, prompts, buttons, links, pickers, toggles, scrolling and disclosure. See all installed styles · Tabs · Fields & editors · Prompts & toasts.
Chio
ChioDisclosureGroupStyle
SwiftTUI
DisclosureGroup, ScrollView
Example code
The folder hierarchy and remembered expansion choices.
Compose a searchable local queue with a Markdown preview and responsive reader flow.
Sort and filter a local review queue while selection stays attached to its identity. The queue and preview grow together as the terminal widens; Enter opens the full reader at any width. Native controls and existing Chio components carry the whole example.
Explore an application-owned, read-only split or unified diff with native scrolling and hunk navigation.
A read-only prototype pairs line-number gutters with changed source lines. Jump between hunks, switch between split and unified layouts, and follow the narrow unified mode through theme and terminal-size changes.
Press play to watch. Pause, seek, or open fullscreen for a closer look.
The shared theme follows you through the catalog and updates each preview, snippet and run command. Recordings keep their original captured themes; try the binary to use the controls yourself.