pub struct Textarea { /* private fields */ }Expand description
Multi-line text input field styled like shadcn/ui
§Example
use armas_basic::components::Textarea;
let mut text = String::new();
Textarea::new("Enter your message...")
.rows(4)
.show(ui, &mut text);Implementations§
Source§impl Textarea
impl Textarea
Sourcepub const fn variant(self, variant: InputVariant) -> Self
pub const fn variant(self, variant: InputVariant) -> Self
Set the textarea variant (for backwards compatibility)
Sourcepub const fn state(self, state: InputState) -> Self
pub const fn state(self, state: InputState) -> Self
Set the validation state
Sourcepub fn description(self, text: impl Into<String>) -> Self
pub fn description(self, text: impl Into<String>) -> Self
Set description/helper text below the textarea
Sourcepub fn helper_text(self, text: impl Into<String>) -> Self
pub fn helper_text(self, text: impl Into<String>) -> Self
Alias for description (backwards compatibility)
Sourcepub fn show(self, ui: &mut Ui, text: &mut String) -> TextareaResponse
pub fn show(self, ui: &mut Ui, text: &mut String) -> TextareaResponse
Show the textarea
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Textarea
impl RefUnwindSafe for Textarea
impl Send for Textarea
impl Sync for Textarea
impl Unpin for Textarea
impl UnsafeUnpin for Textarea
impl UnwindSafe 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