pub trait TextInputExt: Sized {
// Required method
fn placeholder(self, text: impl Into<Value<String>>) -> Self;
}Expand description
Builder methods on a text_input element.
Import the trait to use them:
use smudge_text::TextInputExt;
use smudge_text::text_input;
use smudge_core::reactive::RwSignal;
let field = text_input(RwSignal::new(String::new())).placeholder("Name");Required Methods§
Sourcefn placeholder(self, text: impl Into<Value<String>>) -> Self
fn placeholder(self, text: impl Into<Value<String>>) -> Self
Sets the text shown while the input is empty.
The placeholder paints in the theme’s muted text color, so a theme switch repaints it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".