Form.Autosuggest
Form auto-suggest enables users to manually select or type to find matching options to partial text input.
Basic Usage
Any Paragon component or export may be added to the code example.
Loading state
Any Paragon component or export may be added to the code example.
Theme Variables#
CSS Variable | Computed Value |
---|---|
| |
| |
| |
| |
| |
Props API#
- arrowKeyNavigationSelector
string
Default'a:not(:disabled),li:not(:disabled, .btn-icon),input:not(:disabled)'Specifies the CSS selector string that indicates to which elements the user can navigate using the arrow keys
- ignoredArrowKeysNames
string
[]
Default['ArrowRight', 'ArrowLeft']Specifies ignored hook keys.
- isLoading
bool
DefaultfalseSpecifies loading state.
- className
string
DefaultnullSpecifies class name to append to the base element.
- floatingLabel
string
DefaultnullSpecifies floating label to display for the input component.
- onChange
func
DefaultnullSpecifies onChange event handler.
- helpMessage
string
Default''Specifies help information for the user.
- placeholder
string
Default''Specifies the placeholder text for the input.
- value
shape
{userProvidedText:string
,selectionValue:string
,selectionId:}string
,DefaultnullSpecifies values for the input.
- isValueRequired
bool
DefaultfalseSpecifies if empty values trigger an error state
- valueRequiredErrorMessageText
requiredWhen(PropTypes.string, 'isValueRequired')
DefaultnullInforms user they must input a value.
- isSelectionRequired
bool
DefaultfalseSpecifies if freeform values trigger an error state
- selectionRequiredErrorMessageText
requiredWhen(PropTypes.string, 'isSelectionRequired')
DefaultnullInforms user they must make a selection.
- hasCustomError
bool
DefaultfalseSpecifies the control is in a consumer provided error state
- customErrorMessageText
requiredWhen(PropTypes.string, 'hasCustomError')
DefaultnullInforms user of other errors.
- name
string
Default'form-autosuggest'Specifies the name of the base input element.
- readOnly
bool
DefaultfalseSelected list item is read-only.
- children
node
DefaultnullSpecifies the content of the
FormAutosuggest
. - screenReaderText
string
Default'loading'Specifies the screen reader text
- className
string
DefaultnullSpecifies class name to append to the base element.
- children
string
DefaultnullSpecifies the text-content of the
FormAutosuggestOption
. - onClick
func
DefaultnullA click handler for the
FormAutosuggestOption
Usage Insights#
FormAutosuggest
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-course-authoring | 22.8.1 | 1 | |
frontend-app-support-tools | 21.13.1 | 2 |
FormAutosuggestOption
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-course-authoring | 22.8.1 | 1 | |
frontend-app-support-tools | 21.13.1 | 4 |