ui
0.8.1
jvm
ui
/
org.jetbrains.jewel.ui.component
/
TextField
Text
Field
@
Composable
fun
TextField
(
value
:
String
,
onValueChange
:
(
String
)
->
Unit
,
modifier
:
Modifier
=
Modifier
,
enabled
:
Boolean
=
true
,
readOnly
:
Boolean
=
false
,
outline
:
Outline
=
Outline.None
,
placeholder
:
@
Composable
(
)
->
Unit
?
=
null
,
trailingIcon
:
@
Composable
(
)
->
Unit
?
=
null
,
leadingIcon
:
@
Composable
(
)
->
Unit
?
=
null
,
undecorated
:
Boolean
=
false
,
visualTransformation
:
VisualTransformation
=
VisualTransformation.None
,
keyboardOptions
:
KeyboardOptions
=
KeyboardOptions.Default
,
keyboardActions
:
KeyboardActions
=
KeyboardActions()
,
onTextLayout
:
(
TextLayoutResult
)
->
Unit
=
{}
,
style
:
TextFieldStyle
=
JewelTheme.textFieldStyle
,
interactionSource
:
MutableInteractionSource
=
remember { MutableInteractionSource() }
)
@
Composable
fun
TextField
(
value
:
TextFieldValue
,
onValueChange
:
(
TextFieldValue
)
->
Unit
,
modifier
:
Modifier
=
Modifier
,
enabled
:
Boolean
=
true
,
readOnly
:
Boolean
=
false
,
outline
:
Outline
=
Outline.None
,
placeholder
:
@
Composable
(
)
->
Unit
?
=
null
,
leadingIcon
:
@
Composable
(
)
->
Unit
?
=
null
,
trailingIcon
:
@
Composable
(
)
->
Unit
?
=
null
,
undecorated
:
Boolean
=
false
,
visualTransformation
:
VisualTransformation
=
VisualTransformation.None
,
keyboardOptions
:
KeyboardOptions
=
KeyboardOptions.Default
,
keyboardActions
:
KeyboardActions
=
KeyboardActions()
,
onTextLayout
:
(
TextLayoutResult
)
->
Unit
=
{}
,
style
:
TextFieldStyle
=
JewelTheme.textFieldStyle
,
textStyle
:
TextStyle
=
JewelTheme.textStyle
,
interactionSource
:
MutableInteractionSource
=
remember { MutableInteractionSource() }
)
Parameters
placeholder
the optional placeholder to be displayed over the component when the
value
is empty.