TextInput
value type: string
The TextInput
block is a single line text input.
Block
State
block_id: null
Block Setup
id: block_id
type: TextInput
Settings
Examples
Required text input
id: required_example
type: TextInput
required: true
properties:
title: Required text input
Placeholder
id: placeholder_example
type: TextInput
properties:
placeholder: Placeholder
Prefix and suffix text
The catthe rat
Prefix and suffix text
id: prefix_suffix_example
type: TextInput
properties:
label:
extra: Prefix and suffix text
prefix: The cat
placeholder: chased
suffix: the rat
User name
id: username
type: TextInput
properties:
title: First Name
suffixIcon: UserOutlined
placeholder: Your name
label:
span: 6
TextInput JSON Schema Definition
type: object
properties:
events:
additionalProperties: false
properties:
onChange:
description: Trigger action when text input is changed.
type: array
onPressEnter:
description: Trigger action when enter is pressed while text input is focused.
type: array
type: object
properties:
additionalProperties: false
properties:
allowClear:
default: false
description: Allow the user to clear their input.
type: boolean
autoFocus:
default: false
description: Autofocus to the block on page load.
type: boolean
disabled:
default: false
description: Disable the block if true.
type: boolean
inputStyle:
description: Css style to applied to input.
type: object
label:
additionalProperties: false
description: Label properties.
properties:
align:
default: left
description: Align label left or right when inline.
enum:
- left
- right
type: string
colon:
default: true
description: Append label with colon.
type: boolean
disabled:
default: false
description: Hide input label.
type: boolean
extra:
description: Extra text to display beneath the content - supports html.
type: string
extraStyle:
description: Css style to applied to label extra.
type: object
feedbackStyle:
description: Css style to applied to label feedback.
type: object
hasFeedback:
default: true
description: >-
Display feedback extra from validation, this does not disable
validation.
type: boolean
inline:
default: false
description: Render input and label inline.
type: boolean
span:
description: Label inline span.
type: number
title:
description: Label title - supports html.
type: string
type: object
placeholder:
description: Placeholder text inside the block before user types input.
type: string
prefix:
description: Prefix text for the block, priority over $prefix_con.
type: string
prefixIcon:
description: >-
Name of an Ant Design Icon or properties of an Icon block to customize
icon to prefix the text input.
type:
- string
- object
size:
default: default
description: Size of the block.
enum:
- small
- default
- large
type: string
suffix:
description: Suffix text for the block, priority over suffixIcon.
type: string
suffixIcon:
description: >-
Name of an Ant Design Icon or properties of an Icon block to customize
icon to suffix the text input.
type:
- string
- object
title:
description: >-
Title to describe the input component, if no title is specified the
block id is displayed - supports html.
type: string
type: object