pub fn with_spring_options(frequency: f64, damping: f64) -> ProgressOptionExpand description
Configures the spring animation parameters for smooth progress transitions.
The progress bar uses a spring-based physics system to animate between different progress values. This creates natural-looking transitions that feel responsive and smooth.
§Arguments
frequency- Animation speed (higher = faster, typical range: 10-30)damping- Bounciness control (higher = less bouncy, typical range: 0.5-2.0)
§Examples
use bubbletea_widgets::progress::{new, with_spring_options};
// Fast, snappy animation
let snappy = new(&[
with_spring_options(25.0, 1.5),
]);
// Slow, bouncy animation
let bouncy = new(&[
with_spring_options(12.0, 0.7),
]);
// Smooth, professional animation
let smooth = new(&[
with_spring_options(18.0, 1.2),
]);