pub struct TextInputBuilder { /* private fields */ }Expand description
Configuration handle returned by text_input.
Implementations§
Source§impl TextInputBuilder
§text_input
Renders an editable text field with Material outlined styling and colors
resolved from the active theme.
impl TextInputBuilder
§text_input
Renders an editable text field with Material outlined styling and colors resolved from the active theme.
§Usage
Create an interactive text input for forms, note-taking, or other text input scenarios.
§Parameters
- Parameters configure the editor’s appearance, layout, transforms, and controller state.
§Examples
use tessera_components::text_input::text_input;
use tessera_ui::Dp;
text_input().padding(Dp(8.0)).initial_text("Hello World");Sourcepub fn display_transform_mapped<F>(&self, transform: F) -> Self
pub fn display_transform_mapped<F>(&self, transform: F) -> Self
Set a display-only transform with explicit offset mapping.
Source§impl TextInputBuilder
impl TextInputBuilder
Sourcepub fn enabled_optional(&self, value: Option<bool>) -> Self
pub fn enabled_optional(&self, value: Option<bool>) -> Self
Configure enabled before this component executes.
Sourcepub fn presentation_state(&self, value: InteractionVisualState) -> Self
pub fn presentation_state(&self, value: InteractionVisualState) -> Self
Configure presentation_state before this component executes.
Sourcepub fn presentation_state_optional(
&self,
value: Option<InteractionVisualState>,
) -> Self
pub fn presentation_state_optional( &self, value: Option<InteractionVisualState>, ) -> Self
Configure presentation_state before this component executes.
Sourcepub fn read_only(&self, value: bool) -> Self
pub fn read_only(&self, value: bool) -> Self
Configure read_only before this component executes.
Sourcepub fn read_only_optional(&self, value: Option<bool>) -> Self
pub fn read_only_optional(&self, value: Option<bool>) -> Self
Configure read_only before this component executes.
Sourcepub fn is_error_optional(&self, value: Option<bool>) -> Self
pub fn is_error_optional(&self, value: Option<bool>) -> Self
Configure is_error before this component executes.
Sourcepub fn modifier(&self, value: Modifier) -> Self
pub fn modifier(&self, value: Modifier) -> Self
Configure modifier before this component executes.
Sourcepub fn modifier_optional(&self, value: Option<Modifier>) -> Self
pub fn modifier_optional(&self, value: Option<Modifier>) -> Self
Configure modifier before this component executes.
Sourcepub fn on_change<F>(&self, value: F) -> Self
pub fn on_change<F>(&self, value: F) -> Self
Configure on_change before this component executes.
Configure on_change before this component executes.
Sourcepub fn on_change_optional(
&self,
value: Option<CallbackWith<String, String>>,
) -> Self
pub fn on_change_optional( &self, value: Option<CallbackWith<String, String>>, ) -> Self
Configure on_change before this component executes.
Sourcepub fn on_submit<F>(&self, value: F) -> Self
pub fn on_submit<F>(&self, value: F) -> Self
Configure on_submit before this component executes.
Configure on_submit before this component executes.
Sourcepub fn on_submit_optional(&self, value: Option<Callback>) -> Self
pub fn on_submit_optional(&self, value: Option<Callback>) -> Self
Configure on_submit before this component executes.
Sourcepub fn min_width_optional(&self, value: Option<Dp>) -> Self
pub fn min_width_optional(&self, value: Option<Dp>) -> Self
Configure min_width before this component executes.
Sourcepub fn min_height(&self, value: Dp) -> Self
pub fn min_height(&self, value: Dp) -> Self
Configure min_height before this component executes.
Sourcepub fn min_height_optional(&self, value: Option<Dp>) -> Self
pub fn min_height_optional(&self, value: Option<Dp>) -> Self
Configure min_height before this component executes.
Sourcepub fn background_color(&self, value: Color) -> Self
pub fn background_color(&self, value: Color) -> Self
Configure background_color before this component executes.
Sourcepub fn background_color_optional(&self, value: Option<Color>) -> Self
pub fn background_color_optional(&self, value: Option<Color>) -> Self
Configure background_color before this component executes.
Sourcepub fn border_width(&self, value: Dp) -> Self
pub fn border_width(&self, value: Dp) -> Self
Configure border_width before this component executes.
Sourcepub fn border_width_optional(&self, value: Option<Dp>) -> Self
pub fn border_width_optional(&self, value: Option<Dp>) -> Self
Configure border_width before this component executes.
Sourcepub fn border_color(&self, value: Color) -> Self
pub fn border_color(&self, value: Color) -> Self
Configure border_color before this component executes.
Sourcepub fn border_color_optional(&self, value: Option<Color>) -> Self
pub fn border_color_optional(&self, value: Option<Color>) -> Self
Configure border_color before this component executes.
Sourcepub fn shape_optional(&self, value: Option<Shape>) -> Self
pub fn shape_optional(&self, value: Option<Shape>) -> Self
Configure shape before this component executes.
Sourcepub fn padding_optional(&self, value: Option<Dp>) -> Self
pub fn padding_optional(&self, value: Option<Dp>) -> Self
Configure padding before this component executes.
Sourcepub fn focus_border_color(&self, value: Color) -> Self
pub fn focus_border_color(&self, value: Color) -> Self
Configure focus_border_color before this component executes.
Sourcepub fn focus_border_color_optional(&self, value: Option<Color>) -> Self
pub fn focus_border_color_optional(&self, value: Option<Color>) -> Self
Configure focus_border_color before this component executes.
Sourcepub fn focus_border_width(&self, value: Dp) -> Self
pub fn focus_border_width(&self, value: Dp) -> Self
Configure focus_border_width before this component executes.
Sourcepub fn focus_border_width_optional(&self, value: Option<Dp>) -> Self
pub fn focus_border_width_optional(&self, value: Option<Dp>) -> Self
Configure focus_border_width before this component executes.
Sourcepub fn focus_background_color(&self, value: Color) -> Self
pub fn focus_background_color(&self, value: Color) -> Self
Configure focus_background_color before this component executes.
Sourcepub fn focus_background_color_optional(&self, value: Option<Color>) -> Self
pub fn focus_background_color_optional(&self, value: Option<Color>) -> Self
Configure focus_background_color before this component executes.
Sourcepub fn selection_color(&self, value: Color) -> Self
pub fn selection_color(&self, value: Color) -> Self
Configure selection_color before this component executes.
Sourcepub fn selection_color_optional(&self, value: Option<Color>) -> Self
pub fn selection_color_optional(&self, value: Option<Color>) -> Self
Configure selection_color before this component executes.
Sourcepub fn text_color(&self, value: Color) -> Self
pub fn text_color(&self, value: Color) -> Self
Configure text_color before this component executes.
Sourcepub fn text_color_optional(&self, value: Option<Color>) -> Self
pub fn text_color_optional(&self, value: Option<Color>) -> Self
Configure text_color before this component executes.
Sourcepub fn cursor_color(&self, value: Color) -> Self
pub fn cursor_color(&self, value: Color) -> Self
Configure cursor_color before this component executes.
Sourcepub fn cursor_color_optional(&self, value: Option<Color>) -> Self
pub fn cursor_color_optional(&self, value: Option<Color>) -> Self
Configure cursor_color before this component executes.
Sourcepub fn accessibility_label(&self, value: impl Into<String>) -> Self
pub fn accessibility_label(&self, value: impl Into<String>) -> Self
Configure accessibility_label before this component executes.
Sourcepub fn accessibility_label_optional(&self, value: Option<String>) -> Self
pub fn accessibility_label_optional(&self, value: Option<String>) -> Self
Configure accessibility_label before this component executes.
Sourcepub fn accessibility_description(&self, value: impl Into<String>) -> Self
pub fn accessibility_description(&self, value: impl Into<String>) -> Self
Configure accessibility_description before this component executes.
Sourcepub fn accessibility_description_optional(&self, value: Option<String>) -> Self
pub fn accessibility_description_optional(&self, value: Option<String>) -> Self
Configure accessibility_description before this component executes.
Sourcepub fn initial_text(&self, value: impl Into<String>) -> Self
pub fn initial_text(&self, value: impl Into<String>) -> Self
Configure initial_text before this component executes.
Sourcepub fn initial_text_optional(&self, value: Option<String>) -> Self
pub fn initial_text_optional(&self, value: Option<String>) -> Self
Configure initial_text before this component executes.
Sourcepub fn font_size_optional(&self, value: Option<Dp>) -> Self
pub fn font_size_optional(&self, value: Option<Dp>) -> Self
Configure font_size before this component executes.
Sourcepub fn line_height(&self, value: Dp) -> Self
pub fn line_height(&self, value: Dp) -> Self
Configure line_height before this component executes.
Sourcepub fn line_height_optional(&self, value: Option<Dp>) -> Self
pub fn line_height_optional(&self, value: Option<Dp>) -> Self
Configure line_height before this component executes.
Sourcepub fn style_optional(&self, value: Option<TextStyle>) -> Self
pub fn style_optional(&self, value: Option<TextStyle>) -> Self
Configure style before this component executes.
Sourcepub fn single_line(&self, value: bool) -> Self
pub fn single_line(&self, value: bool) -> Self
Configure single_line before this component executes.
Sourcepub fn single_line_optional(&self, value: Option<bool>) -> Self
pub fn single_line_optional(&self, value: Option<bool>) -> Self
Configure single_line before this component executes.
Sourcepub fn input_transform<F>(&self, value: F) -> Self
pub fn input_transform<F>(&self, value: F) -> Self
Configure input_transform before this component executes.
Configure input_transform before this component executes.
Sourcepub fn input_transform_optional(
&self,
value: Option<CallbackWith<String, String>>,
) -> Self
pub fn input_transform_optional( &self, value: Option<CallbackWith<String, String>>, ) -> Self
Configure input_transform before this component executes.
Sourcepub fn display_transform(&self, value: DisplayTransform) -> Self
pub fn display_transform(&self, value: DisplayTransform) -> Self
Configure display_transform before this component executes.
Sourcepub fn display_transform_optional(
&self,
value: Option<DisplayTransform>,
) -> Self
pub fn display_transform_optional( &self, value: Option<DisplayTransform>, ) -> Self
Configure display_transform before this component executes.
Sourcepub fn controller(&self, value: State<TextInputController>) -> Self
pub fn controller(&self, value: State<TextInputController>) -> Self
Configure controller before this component executes.
Sourcepub fn controller_optional(
&self,
value: Option<State<TextInputController>>,
) -> Self
pub fn controller_optional( &self, value: Option<State<TextInputController>>, ) -> Self
Configure controller before this component executes.
Source§impl TextInputBuilder
Presets for an already declared text input.
impl TextInputBuilder
Presets for an already declared text input.
Sourcepub fn simple(&self) -> Self
pub fn simple(&self) -> Self
Creates a simple text input with default styling.
- Minimum width: 120dp
- Background: white
- Border: 1px gray, rounded rectangle
§Example
use tessera_components::text_input::text_input;
let args = text_input().simple();Auto Trait Implementations§
impl Freeze for TextInputBuilder
impl RefUnwindSafe for TextInputBuilder
impl Send for TextInputBuilder
impl Sync for TextInputBuilder
impl Unpin for TextInputBuilder
impl UnsafeUnpin for TextInputBuilder
impl UnwindSafe for TextInputBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.