mirror of
https://github.com/charmbracelet/gum
synced 2024-05-15 12:46:44 +02:00
docs: Add gifs to README
This commit is contained in:
parent
912157521c
commit
67f923de35
12
README.md
12
README.md
|
@ -82,6 +82,8 @@ Prompt your users for input with a simple command.
|
|||
gum input > answer.text
|
||||
```
|
||||
|
||||
<img src="https://stuff.charm.sh/gum/input.gif" width="350" alt="Shell running gum input typing I love bubble gum <3">
|
||||
|
||||
#### Write
|
||||
|
||||
Prompt your users to write some multi-line text.
|
||||
|
@ -90,6 +92,8 @@ Prompt your users to write some multi-line text.
|
|||
gum write > story.text
|
||||
```
|
||||
|
||||
<img src="https://stuff.charm.sh/gum/write.gif" width="400" alt="Shell running gum write typing My favorite flavors are:">
|
||||
|
||||
#### Filter
|
||||
|
||||
Allow your users to filter through a list of options by fuzzy searching.
|
||||
|
@ -101,6 +105,8 @@ echo Cherry >> flavors.text
|
|||
cat flavors.text | gum filter > selection.text
|
||||
```
|
||||
|
||||
<img src="https://stuff.charm.sh/gum/filter.gif" width="400" alt="Shell running gum filter on different bubble gum flavors">
|
||||
|
||||
#### Choose
|
||||
|
||||
Ask your users to choose an option from a list of choices.
|
||||
|
@ -112,6 +118,8 @@ CARD=$(gum choose --height 15 {{A,K,Q,J},{10..2}}" "{♠,♥,♣,♦})
|
|||
echo "Was your card the $CARD?"
|
||||
```
|
||||
|
||||
<img src="https://stuff.charm.sh/gum/choose.gif" width="400" alt="Shell running gum choose on a deck of cards, picking the Ace of Hearts">
|
||||
|
||||
#### Progress
|
||||
|
||||
Display a progress bar while loading. The following command will display a
|
||||
|
@ -122,6 +130,8 @@ seconds to complete the progress bar.
|
|||
gum progress --increment 0.1 --interval 1s
|
||||
```
|
||||
|
||||
<img src="https://stuff.charm.sh/gum/progress.gif" width="600" alt="Shell running gum progress">
|
||||
|
||||
#### Spinners
|
||||
|
||||
Display a spinner while taking some running action. We specify the command to
|
||||
|
@ -132,6 +142,8 @@ command exits.
|
|||
gum spin --spinner dot --title "Buying Bubble Gum..." -- sleep 5
|
||||
```
|
||||
|
||||
<img src="https://stuff.charm.sh/gum/spin.gif" width="800" alt="Shell running gum spin while sleeping for 5 seconds">
|
||||
|
||||
## Styling and Layout
|
||||
|
||||
#### Style
|
||||
|
|
Loading…
Reference in a new issue