pub struct Textarea { /* private fields */ }Expand description
A multi-line text input that grows with its content.
Implementations§
Source§impl Textarea
impl Textarea
pub fn new() -> Self
pub fn placeholder(self, v: impl Into<String>) -> Self
Sourcepub fn description(self, v: impl MaybeText) -> Self
pub fn description(self, v: impl MaybeText) -> Self
Help text under the field.
Sourcepub fn error_message(self, v: impl MaybeText) -> Self
pub fn error_message(self, v: impl MaybeText) -> Self
Error text under the field; also marks it invalid.
error_message = form.error("email") shows server validation errors.
Sourcepub fn name(self, v: impl Into<String>) -> Self
pub fn name(self, v: impl Into<String>) -> Self
Form field name. Server-action validation errors for this name appear under the field automatically.
pub fn required(self, v: bool) -> Self
pub fn disabled(self, v: bool) -> Self
pub fn readonly(self, v: bool) -> Self
pub fn size(self, v: Size) -> Self
pub fn variant(self, v: FieldVariant) -> Self
pub fn radius(self, v: Radius) -> Self
pub fn label_placement(self, v: LabelPlacement) -> Self
Sourcepub fn start_content(self, v: impl View) -> Self
pub fn start_content(self, v: impl View) -> Self
Content at the start of the box, typically an icon.
Sourcepub fn end_content(self, v: impl View) -> Self
pub fn end_content(self, v: impl View) -> Self
Content at the end of the box.
Sourcepub fn full_width(self, v: bool) -> Self
pub fn full_width(self, v: bool) -> Self
Take the full width of the container (the default).
Sourcepub fn label_class(self, v: impl Into<String>) -> Self
pub fn label_class(self, v: impl Into<String>) -> Self
Extra classes for the label.
Sourcepub fn wrapper_class(self, v: impl Into<String>) -> Self
pub fn wrapper_class(self, v: impl Into<String>) -> Self
Extra classes for the box around the control.
Sourcepub fn input_class(self, v: impl Into<String>) -> Self
pub fn input_class(self, v: impl Into<String>) -> Self
Extra classes for the control itself.
pub fn description_class(self, v: impl Into<String>) -> Self
pub fn error_class(self, v: impl Into<String>) -> Self
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Textarea
impl !Sync for Textarea
impl !UnwindSafe for Textarea
impl Forget for Textarea
impl Freeze for Textarea
impl Move for Textarea
impl Send for Textarea
impl Unpin for Textarea
impl UnsafeUnpin for Textarea
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