|
26 | 26 | //! * [`TextInputAttributes`] - Common text input properties set by the user, such as font, font size, line height, justification, maximum characters etc.
|
27 | 27 | //! * [`TextInputFilter`] - Optional component that can be added to restrict the text input to certain formats, such as integers, decimals, hexadecimal etc.
|
28 | 28 | //! * [`PasswordMask`] - Optional component that can be added to hide the text input buffer contents by replacing the characters with a mask character.
|
| 29 | +//! * [`Placeholder`] - Optional component that can be added to display placeholder text when the input buffer is empty. |
29 | 30 | //!
|
30 | 31 | //! The [`TextInputBuffer`] component itself also has two fields that can be configured:
|
31 | 32 | //!
|
32 |
| -//! - [`TextInputBuffer::space_advance`] - Space advance width for the current font, used to determine the width of the cursor when it is at the end of a line or when the buffer is empty. |
33 |
| -//! - [`TextInputBuffer::cursor_blink_timer`] - Controls cursor blinking. |
| 33 | +//! * [`TextInputBuffer::space_advance`] - Space advance width for the current font, used to determine the width of the cursor when it is at the end of a line or when the buffer is empty. |
| 34 | +//! * [`TextInputBuffer::cursor_blink_timer`] - Controls cursor blinking. |
34 | 35 | //!
|
35 | 36 | //! ## Copy-paste and clipboard support
|
36 | 37 | //!
|
@@ -1124,8 +1125,12 @@ pub enum TextInputEvent {
|
1124 | 1125 | TextChanged,
|
1125 | 1126 | }
|
1126 | 1127 |
|
1127 |
| -/// Placeholder text displayed when the input is empty (including whitespace). |
1128 |
| -/// Optional component. |
| 1128 | +/// Placeholder text displayed when the input is empty. |
| 1129 | +/// |
| 1130 | +/// Text inputs that contain only whitespace (i.e spaces or tabs) are not empty. |
| 1131 | +/// |
| 1132 | +/// This is an optional component, intended to work with [`TextInputTarget`]. |
| 1133 | +/// The font and other properties are controlled with [`TextInputAttributes`]. |
1129 | 1134 | #[derive(Default, Component, Clone, Debug, Reflect, Deref, DerefMut)]
|
1130 | 1135 | #[reflect(Component, Default, Debug)]
|
1131 | 1136 | #[require(PlaceholderLayout)]
|
|
0 commit comments