Skip to content

Latest commit

 

History

History

README.md

Examples

In this directory, you'll find many examples for various concepts and features of iocraft.

To run any of the examples, use cargo run --example NAME. For example, to run the table example: cargo run --example table

Table of Contents

Example Preview
borders.rs
Showcases various border styles.
preview
calculator.rs
Uses clickable buttons to provide a calculator app with light/dark mode themes.
preview
context.rs
Demonstrates using a custom context via ContextProvider and use_context.
preview
counter.rs
Renders a dynamic component which spawns a future to increment a counter every 100ms.
preview
form.rs
Displays a form prompting the user for input into multiple text fields. Uses mutable reference props to surface the user's input to the caller once the form is submitted.
preview
fullscreen.rs
Takes over the full terminal, rendering to an alternate buffer and preventing the user from scrolling.
preview
hello_world.rs
Hello, world!
preview
overlap.rs
Uses absolute positioning to create overlapping elements.
preview
progress_bar.rs
Renders a dynamic progress bar which fills up and then exits.
preview
scrolling.rs
Demonstrates using ScrollView to implement scrollable text.
preview
table.rs
Displays a list of users provided by reference via properties.
preview
use_input.rs
Demonstrates using keyboard input to move a 👾.
preview
use_output.rs
Continuously logs text output above the rendered component.
preview
weather.rs
Demonstrates asynchronous loading of data from remote APIs in response to user input.
preview