--- title: Text sidebar_position: 3 sidebar_custom_props: icon: TbTextSize --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { SandpackEditor} from '@site/src/ui/SandpackEditor' import textInputCode from '!!raw-loader!@site/src/ui/input/components/textInputCode.js' import autosizeTextInputCode from '!!raw-loader!@site/src/ui/input/components/autosizeTextInputCode.js' import entityTitleDoubleTextInputCode from '!!raw-loader!@site/src/ui/input/components/entityTitleDoubleTextInputCode.js' import textAreaCode from '!!raw-loader!@site/src/ui/input/components/textAreaCode.js' ## Text Input Allows users to enter and edit text.
Props Type Description Default
className string Optional name for additional styling
label string Represents the label for the input
onChange function The function called when the input value changes
fullWidth boolean Indicates whether the input should take up 100% of the width
disableHotkeys boolean Indicates whether hotkeys are enabled for the input `false`
error string Represents the error message to be displayed. When provided, it also adds an icon error on the right side of the input
onKeyDown function Called when a key is pressed down while the input field is focused. Receives a `React.KeyboardEvent` as an argument
RightIcon IconComponent An optional icon component displayed on the right side of the input
The component also accepts other HTML input element props.
## Autosize Text Input Text input component that automatically adjusts its height based on the content.
Props Type Description Default
onValidate function The callback function you want to trigger when the user validates the input
minRows number The minimum number of rows for the text area 1
placeholder string The placeholder text you want to display when the text area is empty
onFocus function The callback function you want to trigger when the text area gains focus
variant string The variant of the input. Options include: `default`, `icon`, and `button` default
buttonTitle string The title for the button (only applicable for the button variant)
value string The initial value for the text area Empty string
## Entity Title Double Text Input Displays a pair of text inputs side by side, allowing the user to edit two related values simultaneously.
Props Type Description
firstValue string The value for the first text input
secondValue string The value for the second text input
firstValuePlaceholder string Placeholder text for the first text input, displayed when the input is empty
secondValuePlaceholder string Placeholder text for the second text input, displayed when the input is empty
onChange function The callback function you want to trigger when the text input changes
## Text Area Allows you to create multi-line text inputs.
Props Type Description Default
disabled boolean Indicates whether the text area is disabled
minRows number Minimum number of visible rows for the text area. 1
onChange function Callback function triggered when the text area content changes
placeholder string Placeholder text displayed when the text area is empty
value string The current value of the text area Empty string