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
stringDefault'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
boolDefaultfalseSpecifies loading state.
- className
stringDefaultnullSpecifies class name to append to the base element.
- floatingLabel
stringDefaultnullSpecifies floating label to display for the input component.
- onChange
funcDefaultnullSpecifies onChange event handler.
- helpMessage
stringDefault''Specifies help information for the user.
- placeholder
stringDefault''Specifies the placeholder text for the input.
- value
shape{userProvidedText:string,selectionValue:string,selectionId:}string,DefaultnullSpecifies values for the input.
- isValueRequired
boolDefaultfalseSpecifies if empty values trigger an error state
- valueRequiredErrorMessageText
requiredWhen(PropTypes.string, 'isValueRequired')DefaultnullInforms user they must input a value.
- isSelectionRequired
boolDefaultfalseSpecifies if freeform values trigger an error state
- selectionRequiredErrorMessageText
requiredWhen(PropTypes.string, 'isSelectionRequired')DefaultnullInforms user they must make a selection.
- hasCustomError
boolDefaultfalseSpecifies the control is in a consumer provided error state
- customErrorMessageText
requiredWhen(PropTypes.string, 'hasCustomError')DefaultnullInforms user of other errors.
- name
stringDefault'form-autosuggest'Specifies the name of the base input element.
- readOnly
boolDefaultfalseSelected list item is read-only.
- children
nodeDefaultnullSpecifies the content of the
FormAutosuggest. - screenReaderText
stringDefault'loading'Specifies the screen reader text
- className
stringDefaultnullSpecifies class name to append to the base element.
- children
stringDefaultnullSpecifies the text-content of the
FormAutosuggestOption. - onClick
funcDefaultnullA click handler for the
FormAutosuggestOption
Usage Insights#
FormAutosuggest
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-support-tools | 20.46.0 | 2 |
FormAutosuggestOption
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-support-tools | 20.46.0 | 4 |