@@ -93,6 +93,57 @@ fun MyComposable() {
93
93
}
94
94
```
95
95
96
+ ## FAQ
97
+ < details>< summary> How to create a wavy < i> divider< / i> that is still and fixed and not animated? < / summary>
98
+
99
+ ```kotlin
100
+ WavySlider3 (
101
+ value = 1f ,
102
+ onValueChange = {},
103
+ thumb = {},
104
+ track = {
105
+ SliderDefaults .Track (
106
+ it,
107
+ enabled = false ,
108
+ thumbTrackGapSize = 0 .dp,
109
+ waveThickness = 1 .dp,
110
+ waveVelocity = 0 .dp to RIGHT ,
111
+ animationSpecs = WaveAnimationSpecs (
112
+ waveAppearanceAnimationSpec = snap(),
113
+ waveVelocityAnimationSpec = snap(),
114
+ waveHeightAnimationSpec = snap()
115
+ )
116
+ )
117
+ }
118
+ )
119
+ ```
120
+ < / details>
121
+
122
+ < details>< summary> How to flatten the wave on click/ drag or make the slider wavy only on click/ drag? < / summary>
123
+
124
+ See https: // github.com/mahozad/wavy-slider/issues/8#issuecomment-1903921917.
125
+ < / details>
126
+
127
+ < details>< summary> How to disable the initial/ starting/ appearance (aka composition) animation of the wave? < / summary>
128
+
129
+ Use the Compose `snap()` animation spec (make sure to import the proper M2 / M3 `SliderDefaults ` object ):
130
+ ```kotlin
131
+ animationSpecs = SliderDefaults .WaveAnimationSpecs .copy(waveAppearanceAnimationSpec = snap())
132
+ ```
133
+ < / details>
134
+
135
+ < details>< summary> How to get or use the default value of properties like waveHeight, waveLength, or waveVelocity? < / summary>
136
+
137
+ Use the properties available in `SliderDefaults ` (make sure to import the proper M2 / M3 `SliderDefaults ` object ).
138
+ < / details>
139
+
140
+ < details>< summary> How is the wavy slider component used in its website showcase (i.e. in an HTML / CSS / JavaScript page)? < / summary>
141
+
142
+ Compose Multiplatform and its underlying Kotlin Multiplatform , support compiling Kotlin code to JavaScript (Kotlin / JS )
143
+ or WASM (Kotlin / Wasm ). The project showcase website is in fact also made with Compose Multiplatform framework with
144
+ the help of a little bit of regular HTML and CSS code.
145
+ < / details>
146
+
96
147
## Related
97
148
- AOSP native squiggly progress: [Main branch][Android main branch implementation] ❖ [Android 14 ][Android 14 branch implementation] ❖ [Android 13 ][Android 13 branch implementation]
98
149
- LinearWavyProgressIndicator (available since [Material 3 v1.4.0 - alpha01][Material 3 v1.4.0 - alpha01])
0 commit comments