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
| Example | Preview |
|---|---|
| borders.rs Showcases various border styles. |
![]() |
| calculator.rs Uses clickable buttons to provide a calculator app with light/dark mode themes. |
![]() |
| context.rs Demonstrates using a custom context via ContextProvider and use_context. |
![]() |
| counter.rs Renders a dynamic component which spawns a future to increment a counter every 100ms. |
![]() |
| 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. |
![]() |
| fullscreen.rs Takes over the full terminal, rendering to an alternate buffer and preventing the user from scrolling. |
![]() |
| hello_world.rs Hello, world! |
![]() |
| overlap.rs Uses absolute positioning to create overlapping elements. |
![]() |
| progress_bar.rs Renders a dynamic progress bar which fills up and then exits. |
![]() |
| scrolling.rs Demonstrates using ScrollView to implement scrollable text. |
![]() |
| table.rs Displays a list of users provided by reference via properties. |
![]() |
| use_input.rs Demonstrates using keyboard input to move a 👾. |
![]() |
| use_output.rs Continuously logs text output above the rendered component. |
![]() |
| weather.rs Demonstrates asynchronous loading of data from remote APIs in response to user input. |
![]() |













