mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-25 14:10:31 +00:00
add578a7d6
This commit adds a readme to the examples directory with gifs of each example. This should make it easier to see what each example does without having to run it. I modified the examples to fit better in the gifs. Mostly this was just removing the margins, but for the block example I cleaned up the code a bit to make it more readable and changed it so the background bug is not triggered. For the table example, the combination of Min, Length, and Percent constraints was causing the table to panic when the terminal was too small. I changed the example to use the Max constraint instead of the Length constraint. The layout example now shows information about how the layout is constrained on each block (which is now a paragraph with a block).
21 lines
421 B
VHS
21 lines
421 B
VHS
# This is a vhs script. See https://github.com/charmbracelet/vhs for more info.
|
|
# To run this script, install vhs and run `vhs ./examples/user_input.tape`
|
|
Output "target/user_input.gif"
|
|
Set Width 1200
|
|
Set Height 600
|
|
Hide
|
|
Type "cargo run --example=user_input --features=crossterm"
|
|
Enter
|
|
Sleep 1s
|
|
Show
|
|
Sleep 2s
|
|
Type e
|
|
Sleep 1s
|
|
Type "Hello, world!"
|
|
Enter
|
|
Sleep 2s
|
|
Backspace 13
|
|
Sleep 1s
|
|
Type "Goodbye, world!"
|
|
Enter
|
|
Sleep 5s
|