npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chakra-ui-autocomplete-adapted

v1.4.5

Published

An accessible autocomplete utility library built for chakra UI

Downloads

13

Readme

Chakra-UI AutoComplete-adapted

An Accessible Autocomplete Utility for Chakra UI that composes Downshift ComboBox

demo-image

Install

*Warning This Package is still WIP at the Moment and there might be some missing features

npm install --save chakra-ui-autocomplete-adapted

Usage

  • Usage Example with TSX/Typescript
import React from 'react'
import { CUIAutoComplete } from 'chakra-ui-autocomplete'

export interface Item {
  label: string
  value: string
}
const countries = [
  { value: 'ghana', label: 'Ghana' },
  { value: 'nigeria', label: 'Nigeria' },
  { value: 'kenya', label: 'Kenya' },
  { value: 'southAfrica', label: 'South Africa' },
  { value: 'unitedStates', label: 'United States' },
  { value: 'canada', label: 'Canada' },
  { value: 'germany', label: 'Germany' }
]

export default function App() {
  const [pickerItems, setPickerItems] = React.useState(countries)
  const [selectedItems, setSelectedItems] = React.useState<Item[]>([])

  const handleCreateItem = (item: Item) => {
    setPickerItems((curr) => [...curr, item])
    setSelectedItems((curr) => [...curr, item])
  }

  const handleSelectedItemsChange = (selectedItems?: Item[]) => {
    if (selectedItems) {
      setSelectedItems(selectedItems)
    }
  }

  return (
    <CUIAutoComplete
      label='Choose preferred work locations'
      placeholder='Type a Country'
      onCreateItem={handleCreateItem}
      items={pickerItems}
      selectedItems={selectedItems}
      onSelectedItemsChange={(changes) =>
        handleSelectedItemsChange(changes.selectedItems)
      }
    />
  )
}

Props

| Property | Type | Required | Decscription | | ---------------------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | items | Array | Yes | An array of the items to be selected within the input field | | placeholder | string | | The placeholder for the input field | | label | string | | Input Form Label to describe the activity or process | | highlightItemBg | string | | For accessibility, you can define a custom color for the highlight color when user is typing also accept props like yellow.300 based on chakra theme provider | | onCreateItem | Function | Yes | Function to handle creating new Item | | optionFilterFunc | Function | Yes | You can define a custom Function to handle filter logic | | itemRenderer | Function | | Custom Function that can either return a JSX Element or String, in order to control how the list items within the Dropdown is rendered | | labelStyleProps | Object | | Custom style props based on chakra-ui for labels, Example {{ bg: 'gray.100', pt: '4'}} | | inputStyleProps | Object | | Custom style props based on chakra-ui for input field, Example{{ bg: 'gray.100', pt: '4'}} | | toggleButtonStyleProps | Object | | Custom style props based on chakra-ui for toggle button, Example {{ bg: 'gray.100', pt: '4'}} | | tagStyleProps | Object | | Custom style props based on chakra-ui for multi option tags, Example{{ bg: 'gray.100', pt: '4'}} | | listStyleProps | Object | | Custom style props based on chakra-ui for dropdown list, Example {{ bg: 'gray.100', pt: '4'}} | | listItemStyleProps | Object | | Custom style props based on chakra-ui for single list item in dropdown, Example{{ bg: 'gray.100', pt: '4'}} | | selectedIconProps | Object | | Custom style props based on chakra-ui for the green tick icon in dropdown list, Example {{ bg: 'gray.100', pt: '4'}} | | icon | Object | CheckCircleIcon | @chakra-ui/icons Icon to be displayed instead of CheckCircleIcon | | hideToggleButton | boolean | | Hide the toggle button | | disableCreateItem | boolean | | Disable the "create new" list Item. Default is false | | createItemRenderer | Function | | Custom Function that can either return a JSX Element or String, in order to control how the create new item within the Dropdown is rendered. The input value is passed as the first function parameter, Example: `` (value) =>Create ${value}`` | | renderCustomInput | Function | | Custom function to render input from outside chakra-ui-autocomplete. Receives input props for the input element and toggleButtonProps for the toggle button. Can use this to render chakra-ui's. Example: (inputProps) => (<InputLeftElement pointerEvents="none" children={} /><Input {...inputProps} />)` |

Author

koolamusic

License

MIT © koolamusic