
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
boundless-tokenized-input
Advanced tools
Distill rich entity data matched via typeahead input into simple visual abstractions.
THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD.
Distill rich entity data matched via typeahead input into simple visual abstractions.
Basic usage of this component is identical to that of Typeahead. Additional props are available to take advantage of the tokenization functionality.
When using TokenizedInput in your project, you may call the following methods on a rendered instance of the component. Use refs to get the instance.
add(index: number)
programmatically creates a token for props.entities[index]; props.handleAddToken will be called as a hint to persist the change in your controller view or other application state
focus()
focuses the browser oon the underlying textual input for immediate text entry
getInputNode()
returns the raw underlying textual input DOM node
getSelectedEntityText()
returns the text property of the currently highlighted entity (from props.entities), or returns an empty string
getValue()
retrieves the current value of the underlying textual input
remove(index: number)
programmatically removes the token for props.entities[index]; props.handleRemoveTokens will be called as a hint to persist the change in your controller view or other application state
select()
programmatically creates a full selection on the underlying textual input such that a press of the Backspace key would fully clear the input
setValue(value: string)
sets the underlying textual input to the specified text and updates internal state; do not use this method when using Typeahead as a "controlled input"
Note: only top-level props are in the README, for the full list check out the website.
There are no required props.
| Name | Type | Default Value | Description |
|---|---|---|---|
| algorithm | | | the mechanism used to identify and mark matching substrings; a custom set can be provided as an object (see the properties below) |
| clearOnSelection | | | if `true`, clears the input text when a (partial) match is selected |
| entities | | | an array of objects that user input is filtered against; at a minimum, each object must have a `text` property and any other supplied property is passed through to the resulting DOM element |
| handleAddToken | | | function handler that is called when an entity is selected by the user and a token should be created |
| handleNewSelection | | | function handler that is called when one or more tokens are selected by the user via click or keyboard actions; called with what the new selection should be |
| handleRemoveTokens | | | function handler that is called when one or more tokens are removed by the user via clicking the "close" button or pressing the `Backspace` key while tokens are selected |
| hidePlaceholderOnFocus | | | triggers the placeholder to disappear when the input field is focused, reappears when the user has tabbed away or focus is moved |
| hint | | | renders a disabled textfield with the full text of the currently selected input hint; will remain blank if the matched substring is not at the beginning of the user input |
| hintProps | | | any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes); applied to the `.b-typeahead-hint` HTML element |
| inputProps | | | props to be passed through to the input node, `.b-textual-input`; this includes the standard set of React input props like `defaultValue`, `value`, `name`, `placeholder`, `autoFocus`, etc. |
| matchWrapperProps | | | any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes); applied to the `.b-typeahead-match-wrapper` HTML element |
| offscreenClass | | | the "offscreen" class used by your application; specifically to retain [ARIA navigability](http://snook.ca/archives/html_and_css/hiding-content-for-accessibility) as `display: none` excludes the element from consideration |
| onComplete | | | called when the user presses `Enter` with no autosuggest hint available, indicating that input is complete |
| onEntityHighlighted | | | called with the index of the highlighted entity due to keyboard selection |
| onEntitySelected | | | called with the index of the entity selected by the user |
| tokenCloseComponent | | | the JSX used for the close button itself |
| tokenCloseVisible | | | determines if the `.b-tokenfield-token-close` element should be rendered for each token |
| tokens | | | the indexes of entities that should be rendered as "tokens" in the component UI |
| tokensSelected | | | the indexes of tokenized entities that are part of an active selection; the user can press `Backspace` to trigger `handleRemoveTokens` |
FAQs
Distill rich entity data matched via typeahead input into simple visual abstractions.
The npm package boundless-tokenized-input receives a total of 47 weekly downloads. As such, boundless-tokenized-input popularity was classified as not popular.
We found that boundless-tokenized-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.