Skip to content

Commit c71ba7d

Browse files
committed
Add tui-slider widget to showcase
This PR introduces a new tui-slider documentation and demo tape. For detailed documentation please visit https://github.com/sorinirimies/tui-slider A tui-slider.gif is included in the third-party-widgets showcasing the widget's capabilities. Tui Slider Features: - 🎚️ Horizontal and Vertical sliders - Support for both orientations - 🎨 Border styles - Multiple border style options with customizable symbols - 🎯 Title alignment - Left, center, and right title positioning - 📊 Value alignment - Flexible value display positioning - 📍 Vertical positioning - Label and value positioning for vertical sliders - 🎨 Progress bars - Use as progress indicators without handles - 🔧 Easy to use - Minimal configuration required - 📊 State management - Built-in state for value tracking - ⚡ Lightweight - No complex dependencies
1 parent 787a7ec commit c71ba7d

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# A VHS tape. See https://github.com/charmbracelet/vhs
2+
3+
# for running against the tui-slider git repo https://github.com/sorinirimies/tui-slider
4+
Output "tui-slider.gif"
5+
Set Theme "Aardvark Blue"
6+
Set Width 1600
7+
Set Height 1000
8+
Set FontSize 16
9+
Set Padding 20
10+
11+
Hide
12+
Type "cargo run --release --example horizontal"
13+
Enter
14+
Sleep 3s
15+
Show
16+
17+
# Show horizontal sliders - page 1 (Standard Styles)
18+
Sleep 2s
19+
20+
# Adjust some sliders quickly
21+
Down
22+
Sleep 0.3s
23+
Right Right Right
24+
Sleep 0.3s
25+
Down
26+
Sleep 0.3s
27+
Left Left
28+
Sleep 0.3s
29+
Down
30+
Sleep 0.3s
31+
Right Right Right
32+
Sleep 0.8s
33+
34+
# Navigate to page 2 (Specialty Styles)
35+
Type "n"
36+
Sleep 1.5s
37+
38+
# Adjust sliders on page 2
39+
Down
40+
Sleep 0.3s
41+
Right Right
42+
Sleep 0.3s
43+
Down
44+
Sleep 0.3s
45+
Left Left
46+
Sleep 1s
47+
48+
# Exit and show vertical sliders
49+
Hide
50+
Type "q"
51+
Sleep 0.3s
52+
Type "cargo run --release --example vertical"
53+
Enter
54+
Sleep 3s
55+
Show
56+
57+
# Demonstrate vertical sliders
58+
Sleep 1.5s
59+
Down
60+
Sleep 0.3s
61+
Up Up Up
62+
Sleep 0.3s
63+
Right
64+
Sleep 0.3s
65+
Down
66+
Sleep 0.3s
67+
Up Up
68+
Sleep 1.5s
69+
70+
Hide
71+
Type "q"
72+
Sleep 0.3s

src/content/docs/showcase/third-party-widgets.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ views.
7272

7373
![Demo of tui-scrollview](https://vhs.charm.sh/vhs-6PuT3pdwSTp4aTvKrCBx9F.gif)
7474

75+
## Tui-slider <LinkBadge text="Crate" href="https://crates.io/crates/tui-slider" /> <LinkBadge text="Docs" href="https://docs.rs/tui-slider" /> <LinkBadge text="GitHub" href="https://github.com/sorinirimies/tui-slider" />
76+
77+
[`tui-slider`](https://crates.io/crates/tui-slider) is a highly customizable slider widget for both
78+
horizontal and vertical orientations. Perfect for music players, audio mixers, settings panels, and
79+
progress indicators with extensive styling options including borders, colors, symbols, and
80+
alignments.
81+
82+
![tui-slider](./third-party-widgets/tui-slider.gif)
83+
7584
## Tui-term <LinkBadge text="Crate" href="https://crates.io/crates/tui-term" /> <LinkBadge text="Docs" href="https://docs.rs/tui-term" /> <LinkBadge text="GitHub" href="https://github.com/a-kenji/tui-term" />
7685

7786
[`tui-term`](https://crates.io/crates/tui-term) is a pseudoterminal widget.
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)