Filled Text Field
A text field whose label is inside its box: the label rests where the text will be, and moves up to its own line above the text when the field takes the focus or holds a text.
import com.pantrixui.components.inputs.filledtextfield.PantrixFilledTextField
- The label inside the box. At rest
labelis in the text's place and in the text's size; with the focus, or while there is a text, it shrinks and moves up to its own line. In a field with no label the text stands in the middle of the box. - Placeholder.
placeholdershows while the label is out of its place: while the field is empty and has the focus. In a field with no label it shows whenever the field is empty. - Fill and outline. At rest the box is filled and has no outline. With the focus and in error the fill turns to the surface's colour and the box is outlined; it takes an outline under a pointer too. A disabled field has no fill.
- Supporting text and error.
supportingTextis written under the box.errorturns the outline, the supporting text and the caret to thedangerrole, and a screen reader is told; the label keeps its own colour. - Several lines. With
lineLimits = TextFieldLineLimits.MultiLine(...)the box is as tall as its least lines, grows to its most, and from there scrolls its text inside it: the bar at its end shows how far. - Icons, clear button, count.
leadingIconstands before the label and the text, andtrailingIconafter them.showClearButtonshows the button that empties the field;maxLengthlimits the length and writes the count. - Three overloads. In the one that takes
statethe text is read from the state. The one that takesvalueandonValueChangekeeps the text with its caller; it has no scroll bar. The one that takesfieldtakes its value, its error and its name from its field in the form. - Style and colours.
style(FilledTextFieldStyle) changes the box's shape and dimensions, andcolors(FilledTextFieldColors) its colours: only the fields that are set. A disabled field has no fill and is in the theme's disabled text colour whatever is given. - Text size. What is typed, the resting label and the placeholder are set in the style's
textRole:body(16sp) on Android and iOS,label(14sp) on the desktop and the web. - Automation. With
tagKeythe field is namedFilledTextField_<tagKey>, and its clear buttonFilledTextFieldClear_<tagKey>. The field reports that it took the focus and that it was cleared, and never its text.
Examples
At its plainest
The least it takes: a TextFieldState and a label. The label is inside the box: it rests in the text's place while the field is empty and without the focus. Press the field: the label moves up to its own line above the text and makes room for the text. If the focus leaves the field while it is empty, the label goes back to its place.
The typed text is read from the state: the line below shows city.text as it is typed.
val city = rememberTextFieldState()
PantrixFilledTextField(
state = city,
modifier = Modifier.fillMaxWidth(),
label = "City",
tagKey = "city"
)
PantrixText(
text = if (city.text.isEmpty()) "No city typed yet" else "Typed: ${city.text}",
color = PantrixTheme.colors.textSecondary
)
Label and placeholder
The first field is empty: the label rests in the text's place and the placeholder is not shown. Press the field: the label moves up, and the placeholder appears where the label was. A placeholder is not a label; it gives an example of what to type.
The second field holds a text, so its label is always up. The third has no label: the text stands in the middle of the box, the placeholder shows whenever the field is empty, and contentDescription tells a screen reader the field's name.
PantrixFilledTextField(
state = rememberTextFieldState(),
modifier = Modifier.fillMaxWidth(),
label = "Website",
placeholder = "https://example.com",
tagKey = "website"
)
PantrixFilledTextField(
state = rememberTextFieldState("Kadıköy"),
modifier = Modifier.fillMaxWidth(),
label = "District",
tagKey = "district"
)
PantrixFilledTextField(
state = rememberTextFieldState(),
modifier = Modifier.fillMaxWidth(),
placeholder = "Search neighbourhoods",
contentDescription = "Search neighbourhoods",
tagKey = "neighbourhood"
)
Supporting text and error
supportingText stands under the box. error = true outlines the box in the danger colour; the supporting text and the caret turn to that colour too, and a screen reader announces the message as the error. The label keeps its own colour: the outline and the message are what show the error. The fill turns to the surface's colour, as it does with the focus.
The field starts in error. Delete the space: the outline loses the error's colour and the supporting text takes the place of the error message.
val username = rememberTextFieldState("ayşe yılmaz")
val hasSpace = username.text.contains(' ')
PantrixFilledTextField(
state = username,
modifier = Modifier.fillMaxWidth(),
label = "Username",
supportingText = if (hasSpace) "A username cannot contain spaces" else "Appears in your profile's address",
error = hasSpace,
showClearButton = true,
tagKey = "username"
)
Icon, clear button and action key
leadingIcon stands before the label and the text. A slot does not size what is put in it; the icon takes the size in the filled field's style: PantrixTheme.style(FilledTextFieldStyle).iconSize. While the field is not empty, showClearButton shows the button that empties it: the button leaves the caret in the field, and is no stop for Tab.
keyboardOptions makes the keyboard's action key "Search"; onKeyboardAction is called when that key is pressed. Type something and press the keyboard's "Search" key or Enter: the app's snackbar says what was searched for.
val snackbars = LocalPantrixSnackbars.current
val scope = rememberCoroutineScope()
val query = rememberTextFieldState()
PantrixFilledTextField(
state = query,
modifier = Modifier.fillMaxWidth(),
label = "Search branches",
leadingIcon = {
PantrixIcon(
imageVector = PantrixIcons.Search,
contentDescription = null,
size = PantrixTheme.style(FilledTextFieldStyle).iconSize
)
},
showClearButton = true,
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search),
onKeyboardAction = { scope.launch { snackbars?.show(message = "Branch searched for: ${query.text}") } },
tagKey = "branch"
)
Input and output transformations
inputTransformation turns an edit down whole if it holds anything that is not a digit; maxLength = 4 applies to what it lets through. outputTransformation draws a slash between the month and the year: the slash is not part of the text.
Type "1228": the box shows "12/28", while expiry.text, which the line below reads, is four digits.
val expiry = rememberTextFieldState()
PantrixFilledTextField(
state = expiry,
modifier = Modifier.fillMaxWidth(),
label = "Expiry date",
placeholder = "MM/YY",
maxLength = 4,
showCharacterCount = false,
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
inputTransformation = DigitsOnly,
outputTransformation = MonthSlashYear,
contentType = ContentType.CreditCardExpirationDate,
tagKey = "expiry"
)
PantrixText(text = "Text held: \"${expiry.text}\"", color = PantrixTheme.colors.textSecondary)
private val DigitsOnly = InputTransformation {
if (!asCharSequence().all(Char::isDigit)) revertAllChanges()
}
private val MonthSlashYear = OutputTransformation {
if (length > 2) insert(2, "/")
}
A money transfer form
A money transfer form, with the three overloads together. The first two fields are bound to the form: each takes its value, its error and its name from its field in the form; if the focus leaves one while it is empty, the rule's message shows under the box and the box is outlined in the error colour. The amount field holds its text as a String and turns down whatever is not a digit in onValueChange: an edit that is turned down is not shown. Its limit is seven digits; its count is hidden with showCharacterCount = false.
The note is three lines tall: a text that does not fit scrolls inside the box, and the bar at its end shows how far. Its text is in the state created with rememberTextFieldState, and is read from there when the form is sent: the notification reads it with note.text.
In the first three fields the keyboard's "Next" key moves the focus to the next field. Leave the fields empty and press "Send": the form is not sent, and the first field in error takes the focus.
val snackbars = LocalPantrixSnackbars.current
val scope = rememberCoroutineScope()
val form = rememberFormState()
var amount by rememberSaveable { mutableStateOf("") }
val note = rememberTextFieldState()
PantrixFilledTextField(
field = form.field("recipient", initial = "", Rules.notBlank("Enter the recipient's name")),
modifier = Modifier.fillMaxWidth(),
form = form,
label = "Recipient's full name",
keyboardOptions = KeyboardOptions(capitalization = KeyboardCapitalization.Words, imeAction = ImeAction.Next)
)
PantrixFilledTextField(
field = form.field("iban", initial = "", Rules.notBlank("Enter the IBAN")),
modifier = Modifier.fillMaxWidth(),
form = form,
label = "IBAN",
placeholder = "TR00 0000 0000 0000 0000 0000 00",
showClearButton = true,
keyboardOptions = KeyboardOptions(
capitalization = KeyboardCapitalization.Characters,
imeAction = ImeAction.Next
)
)
PantrixFilledTextField(
value = amount,
onValueChange = { if (it.all(Char::isDigit)) amount = it },
modifier = Modifier.fillMaxWidth(),
label = "Amount",
placeholder = "0",
supportingText = "Digits only",
trailingIcon = { PantrixText(text = "TL") },
maxLength = 7,
showCharacterCount = false,
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number, imeAction = ImeAction.Next),
tagKey = "amount"
)
PantrixFilledTextField(
state = note,
modifier = Modifier.fillMaxWidth(),
label = "Note",
placeholder = "Rent, dues, debt…",
maxLength = 140,
lineLimits = TextFieldLineLimits.MultiLine(minHeightInLines = 3, maxHeightInLines = 3),
tagKey = "transfer_note"
)
PantrixButton(
text = "Send",
onClick = {
scope.launch {
form.submit {
// The note is read from the state at the moment it is used.
val sent = if (note.text.isBlank()) "Money sent" else "Money sent: ${note.text}"
snackbars?.show(message = sent, tagKey = "transfer_sent")
}
}
},
form = form,
tagKey = "send_transfer"
)
A field given a height
A height given to the field is the whole field's: Modifier.height(140.dp). The box takes what the supporting text under it leaves of that height; the label and the text stay inside the box, a text that does not fit scrolls there, and the bar at its end shows how far.
PantrixFilledTextField(
state = rememberTextFieldState(COMPLAINT),
modifier = Modifier.fillMaxWidth().height(140.dp),
label = "Your complaint",
supportingText = "The field's height is fixed: the text scrolls inside the box",
lineLimits = TextFieldLineLimits.MultiLine(),
tagKey = "complaint"
)
private const val COMPLAINT = "The same payment was taken from my card twice.\n" +
"The first was on the third of the month, the second on the fourth.\n" +
"Both are for the same amount and from the same merchant.\n" +
"I have both receipts.\n" +
"I would like one of them refunded."
Disabled and read-only
enabled = false takes the field's fill away: a disabled field is drawn in the theme's disabled text colour on the ground it stands on, takes no focus, and a screen reader is told that it is disabled. This is so whatever colors gives: a disabled field looks the same everywhere in an app.
With readOnly = true the field keeps its fill and its colours: it can be focused and its text selected and copied; it just cannot be changed.
PantrixFilledTextField(
state = rememberTextFieldState("TL current account - 1042"),
modifier = Modifier.fillMaxWidth(),
enabled = false,
label = "Sending account",
supportingText = "Cannot be changed in this transaction",
tagKey = "account"
)
PantrixFilledTextField(
state = rememberTextFieldState("TR33 0006 1005 1978 6457 8413 26"),
modifier = Modifier.fillMaxWidth(),
readOnly = true,
label = "Your IBAN",
supportingText = "Read-only: it can be selected and copied",
tagKey = "own_iban"
)
Its own colours
The colours given with colors are used, and the ones left out stay the theme's roles. The first field takes its colours from the theme's info role. At rest the fill is the role's soft tone; the label, the text and the icon are in the colour that reads on that tone. With the focus and under a pointer the outline is the role's own colour. The fill with the focus, the placeholder, the supporting text and the error colour are not given: they stay as the theme has them.
The second field does the same with the app's own purple: a colour that is in none of the theme's roles. Press the field: the outline and the caret are purple, and with the focus the fill turns to the theme's surface colour.
val info = PantrixTheme.colors.info
PantrixFilledTextField(
state = rememberTextFieldState(),
modifier = Modifier.fillMaxWidth(),
label = "Referral code",
placeholder = "PX-0000",
supportingText = "The code of the person who invited you, if any",
showClearButton = true,
colors = FilledTextFieldColors(
container = info.container,
hoveredOutline = info.color,
focusedOutline = info.color,
text = info.onContainer,
label = info.onContainer,
icon = info.onContainer,
cursor = info.color
),
tagKey = "reference"
)
val own = ownColors()
PantrixFilledTextField(
state = rememberTextFieldState(),
modifier = Modifier.fillMaxWidth(),
label = "Promo code",
colors = FilledTextFieldColors(
container = own.container,
hoveredOutline = own.color,
focusedOutline = own.color,
text = own.onContainer,
label = own.onContainer,
cursor = own.color
),
tagKey = "own_colors"
)
Its own style
style is this call's own style: only the fields it sets change, and the rest comes from the theme's and the platform's style.
The first field's box is fully round: FilledTextFieldStyle(shape = ShapeRole.Full). The second has small corners and, with borderWidth = 2.dp, a thick outline. The outline shows with the focus, in error and under a pointer; at rest the box has none.
PantrixFilledTextField(
state = rememberTextFieldState(),
modifier = Modifier.fillMaxWidth(),
label = "Fully round box",
style = FilledTextFieldStyle(shape = ShapeRole.Full),
tagKey = "pill"
)
PantrixFilledTextField(
state = rememberTextFieldState(),
modifier = Modifier.fillMaxWidth(),
label = "Small corners, thick outline",
style = FilledTextFieldStyle(shape = ShapeRole.Small, borderWidth = 2.dp),
tagKey = "small_corners"
)
API
state
A text field whose label is inside its box: the label rests where the text will be, and moves up to its own line above the text when the field takes the focus or holds a text.
| Parameter | Type | Default | What it is |
|---|---|---|---|
state | TextFieldState | the text and the selection. Create it with rememberTextFieldState(), and read what was typed from it: state.text where the text is used, or snapshotFlow { state.text.toString() } to follow it as it changes. | |
modifier | Modifier | Modifier | the modifier of the whole field: its box and what is under it. fillMaxWidth() makes the box as wide as its parent. A height is the whole field's as well: the box fills what the supporting text leaves of it, with one line in its middle and several from its top, and a text too long for the box scrolls in it. |
enabled | Boolean | true | whether the field can be typed into. One that cannot takes no focus, is drawn without its fill in the disabled colours, and says so. |
readOnly | Boolean | false | whether the text can only be read: it can still be focused, selected and copied. |
label | String? | null | what the field is for, written inside the box: the field's name for a screen reader. Without one the text stands in the middle of the box, and the placeholder shows whenever the field is empty. |
placeholder | String? | null | shown where the text goes while the field is empty and its label is out of the way, which is while it has the focus. |
supportingText | String? | null | help under the box, in a smaller type. With error it is the message that says what to put right, which a screen reader announces as the error. |
error | Boolean | false | whether the text is wrong: the box is outlined in the danger role's colour, the supporting text and the caret turn to it, and a screen reader is told. |
leadingIcon | (@Composable () -> Unit)? | null | what stands before the label and the text, in the secondary text colour. A slot does not size what is put in it: PantrixIcon(size = PantrixTheme.style(FilledTextFieldStyle).iconSize) is the platform's size. |
trailingIcon | (@Composable () -> Unit)? | null | what stands after the text, and after the clear button. |
showClearButton | Boolean | false | shows a button that empties the field, while the field can be typed into and is not empty. It leaves the caret in the field, and is no stop for Tab. |
maxLength | Int? | null | the most characters the user can enter, counted as String.length counts them. An edit that would pass the limit is turned down whole. Text set in code is not cut, and the user can still make it shorter. It has to be positive. |
showCharacterCount | Boolean | true | shows count/maxLength under the box while maxLength is set. |
lineLimits | TextFieldLineLimits | TextFieldLineLimits.SingleLine | one line, or TextFieldLineLimits.MultiLine: the box is as tall as its least lines, grows to its most, and scrolls from there. Tab moves the focus on from either. |
keyboardOptions | KeyboardOptions | KeyboardOptions.Default | the keyboard's type, its capitals, its corrections and its action key. |
onKeyboardAction | KeyboardActionHandler? | null | called for the keyboard's action key, for the action keyboardOptions names. Null keeps what the platform does. |
inputTransformation | InputTransformation? | null | what is done to the text as the user types it. With maxLength, it comes first and the limit applies to what it lets through. |
outputTransformation | OutputTransformation? | null | how the text is shown, without changing it. |
contentType | ContentType? | null | what the field holds, for the platform to fill it in: ContentType.EmailAddress and the like. |
style | FilledTextFieldStyle? | null | this call's own style: over every enclosing one and under the density. Only the fields it sets change, on every platform. |
colors | FilledTextFieldColors? | null | this call's own colours, in place of the theme's roles: the ones it sets are used, and the rest stay the theme's. A disabled field has no fill and is drawn in the theme's disabled text colour whatever is given. |
contentDescription | String? | null | what a screen reader says for the field: its name where it has no label. A placeholder that says the same is then left to the eye. |
tagKey | String? | null | the field's automation key: the field is FilledTextField_<tagKey>, and its clear button FilledTextFieldClear_<tagKey>. The field reports that it took the focus and that it was cleared, and never its text. |
interactionSource | MutableInteractionSource? | null | the field's interactions, hoisted: its focus, its hover and its presses. It keeps a source of its own when this is null. |
value
A filled text field whose text is a String its caller holds: value is what it shows, and onValueChange is asked for every change the user makes.
| Parameter | Type | Default | What it is |
|---|---|---|---|
value | String | the text the field shows. | |
onValueChange | (String) -> Unit | asked for each change the user makes, with the whole new text, and by the clear button with an empty one. | |
modifier | Modifier | Modifier | the modifier of the whole field: its box and what is under it. |
enabled | Boolean | true | whether the field can be typed into. |
readOnly | Boolean | false | whether the text can only be read: it can still be focused, selected and copied. |
label | String? | null | what the field is for, written inside the box: the field's name for a screen reader. |
placeholder | String? | null | shown where the text goes while the field is empty and its label is out of the way. |
supportingText | String? | null | help under the box. With error it is the message that says what to put right. |
error | Boolean | false | whether the text is wrong: the box is outlined in the danger role's colour, and a screen reader is told. |
leadingIcon | (@Composable () -> Unit)? | null | what stands before the label and the text. A slot does not size what is put in it. |
trailingIcon | (@Composable () -> Unit)? | null | what stands after the text, and after the clear button. |
showClearButton | Boolean | false | shows a button that asks for an empty text, while the field can be typed into and is not empty. |
maxLength | Int? | null | the most characters the user can enter. An edit that would pass the limit is turned down whole, before onValueChange is asked. A value over the limit is shown as it is, and the user can still make it shorter. It has to be positive. |
showCharacterCount | Boolean | true | shows count/maxLength under the box while maxLength is set. |
singleLine | Boolean | true | whether the field holds one line, which scrolls sideways. It does unless told otherwise. A line break in value is then shown as a space, and value keeps it. |
minLines | Int | 1 | the least lines the box is tall, in a field of several. |
maxLines | Int | if (singleLine) 1 else Int.MAX_VALUE | the most lines the box grows to before its text scrolls, in a field of several. |
keyboardOptions | KeyboardOptions | KeyboardOptions.Default | the keyboard's type, its capitals, its corrections and its action key. |
keyboardActions | KeyboardActions | KeyboardActions.Default | what the keyboard's action key does, for the action keyboardOptions names. |
visualTransformation | VisualTransformation | VisualTransformation.None | how the text is shown, without changing it: PasswordVisualTransformation() draws a dot for each character. |
contentType | ContentType? | null | what the field holds, for the platform to fill it in. |
style | FilledTextFieldStyle? | null | this call's own style: over every enclosing one and under the density. Only the fields it sets change, on every platform. |
colors | FilledTextFieldColors? | null | this call's own colours, in place of the theme's roles: the ones it sets are used, and the rest stay the theme's. A disabled field has no fill and is drawn in the theme's disabled text colour whatever is given. |
contentDescription | String? | null | what a screen reader says for the field: its name where it has no label. |
tagKey | String? | null | the field's automation key: the field is FilledTextField_<tagKey>, and its clear button FilledTextFieldClear_<tagKey>. |
interactionSource | MutableInteractionSource? | null | the field's interactions, hoisted. It keeps a source of its own when this is null. |
field
A filled text field bound to a form's field: its text, its error and its name come from field.
| Parameter | Type | Default | What it is |
|---|---|---|---|
field | FormField<String> | the field the text field shows and changes. | |
modifier | Modifier | Modifier | the modifier of the whole field. |
form | FormState? | null | given, the keyboard's action key submits the form through the button registered with it. An action of Next or Previous moves the focus as it always does. A field of one line that names no action gets ImeAction.Done, since the default action never reaches a handler. A field of several lines is left alone: there Enter starts a new line. An onKeyboardAction of the caller's own takes the place of the submit. |
enabled | Boolean | true | whether the field can be typed into. |
readOnly | Boolean | false | whether the text can only be read. |
label | String? | null | what the field is for, written inside the box: the field's name for a screen reader. |
placeholder | String? | null | shown where the text goes while the field is empty and its label is out of the way. |
supportingText | String? | null | help under the box, while the field has no error to show there. |
leadingIcon | (@Composable () -> Unit)? | null | what stands before the label and the text. |
trailingIcon | (@Composable () -> Unit)? | null | what stands after the text, and after the clear button. |
showClearButton | Boolean | false | shows a button that empties the field, while it can be typed into and is not empty. |
maxLength | Int? | null | the most characters the user can enter. It has to be positive. |
showCharacterCount | Boolean | true | shows count/maxLength under the box while maxLength is set. |
lineLimits | TextFieldLineLimits | TextFieldLineLimits.SingleLine | one line, or TextFieldLineLimits.MultiLine. Tab moves the focus on from either. |
keyboardOptions | KeyboardOptions | KeyboardOptions.Default | the keyboard's type, its capitals, its corrections and its action key. |
onKeyboardAction | KeyboardActionHandler? | null | called for the keyboard's action key, in place of the form's submit. |
inputTransformation | InputTransformation? | null | what is done to the text as the user types it. |
outputTransformation | OutputTransformation? | null | how the text is shown, without changing it. |
contentType | ContentType? | null | what the field holds, for the platform to fill it in. |
style | FilledTextFieldStyle? | null | this call's own style: over every enclosing one and under the density. Only the fields it sets change, on every platform. |
colors | FilledTextFieldColors? | null | this call's own colours, in place of the theme's roles: the ones it sets are used, and the rest stay the theme's. A disabled field has no fill and is drawn in the theme's disabled text colour whatever is given. |
contentDescription | String? | null | what a screen reader says for the field where it has no label. |
interactionSource | MutableInteractionSource? | null | the field's interactions, hoisted. It keeps a source of its own when this is null. |
FilledTextFieldStyle
PantrixFilledTextField's box: its shape, how tall and how wide it is at the least, the room around what it holds, its icons and its outline.
| Parameter | Type | Default | What it is |
|---|---|---|---|
shape | ShapeSpec | ShapeSpec.Unspecified | The box's shape. A fully round one, ShapeRole.Full, is a pill only while the field holds one line: a field of several lines takes ShapeRole.Large instead, since a capsule's curve runs into the first line of its text. |
height | Dp | Dp.Unspecified | The least the box is tall. |
minWidth | Dp | Dp.Unspecified | The least the box is wide, which keeps an empty field from growing as the user types into it. |
horizontalPadding | Dp | Dp.Unspecified | The room between the box's edge and its label and text, where no icon is. |
verticalPadding | Dp | Dp.Unspecified | The room above the label's line and below the last line of the text. |
iconPadding | Dp | Dp.Unspecified | The room around an icon in its slot. |
iconSize | Dp | Dp.Unspecified | The size an icon in a slot should take. A slot does not size what is put in it. |
borderWidth | Dp | Dp.Unspecified | How thick the outline is that the box takes with the focus, in error and under a pointer. At rest it has none. |
textRole | TypeRole? | null | The role of the type scale the text is typed in, the label rests in and the placeholder is set in: the body's, 16sp, on Android and iOS, as Material 3 types a field, and the label's, 14sp, on the desktop and the web, as a page under a pointer does. |
FilledTextFieldColors
What PantrixFilledTextField is painted with, for a field that does not take the theme's: a colour that is set is used, and one that is left out stays the theme's role. A product gives the colours it changes and no others:
| Parameter | Type | Default | What it is |
|---|---|---|---|
container | Color | Color.Unspecified | The box's fill at rest. The theme's neutral container. |
focusedContainer | Color | Color.Unspecified | The box's fill under an outline: with the focus, and in error. The theme's surface. |
hoveredOutline | Color | Color.Unspecified | The outline under a pointer. The theme's borderHover. |
focusedOutline | Color | Color.Unspecified | The outline while the field has the focus. The theme's primary. |
error | Color | Color.Unspecified | What says the text is wrong: the outline, the message under the box, the caret, and the count once it is past its limit. The theme's danger. |
text | Color | Color.Unspecified | The typed text. The theme's textPrimary. |
label | Color | Color.Unspecified | The label, at rest in the text's place and on its own line above the text. The theme's textSecondary. |
placeholder | Color | Color.Unspecified | The placeholder. The theme's textSecondary. |
supportingText | Color | Color.Unspecified | The help under the box, and the count. The theme's textSecondary. |
icon | Color | Color.Unspecified | What an icon in a slot is drawn in unless it sets a tint of its own, and the clear button's cross. The theme's textSecondary. |
cursor | Color | Color.Unspecified | The caret, and with it the handles and the highlight of a selection. The theme's primary. |
scrollBar | Color | Color.Unspecified | The bar that shows how far the text of a box of several lines is scrolled. The theme's borderStrong: it is a mark on the box's fill, and a box's soft edge would not be seen there. |
Accessibility
- Keyboard and transformations.
keyboardOptions,onKeyboardAction,inputTransformation,outputTransformationandcontentTypeare the same as the text field's.