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) -> Textarea
pub const fn variant(self, variant: InputVariant) -> Textarea
Set the textarea variant (for backwards compatibility)
Sourcepub const fn state(self, state: InputState) -> Textarea
pub const fn state(self, state: InputState) -> Textarea
Set the validation state
Sourcepub fn description(self, text: impl Into<String>) -> Textarea
pub fn description(self, text: impl Into<String>) -> Textarea
Set description/helper text below the textarea
Sourcepub fn helper_text(self, text: impl Into<String>) -> Textarea
pub fn helper_text(self, text: impl Into<String>) -> Textarea
Alias for description (backwards compatibility)
Sourcepub const fn resizable(self, resizable: bool) -> Textarea
pub const fn resizable(self, resizable: bool) -> Textarea
Set whether the textarea is resizable
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