pub struct Gradient;Expand description
A component that renders text with a horizontal color gradient.
§Examples
ⓘ
// Rainbow gradient
Element::node::<Gradient>(
GradientProps::new("Hello, World!"),
vec![]
)
// Preset gradient
Element::node::<Gradient>(
GradientProps::new("Sunset text")
.preset(GradientPreset::Sunset),
vec![]
)
// Custom two-color gradient
Element::node::<Gradient>(
GradientProps::new("Custom colors")
.two_colors(Color::Red, Color::Blue),
vec![]
)Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gradient
impl RefUnwindSafe for Gradient
impl Send for Gradient
impl Sync for Gradient
impl Unpin for Gradient
impl UnwindSafe for Gradient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more