Collection of theme-ui and external components.
Theme UI
created:3/15/2021
updated:3/15/2021
source lines:182
comments %:23

SearchInput

@component-controls/components
3.4.5

an input component combined with a popover, can be used for incremental search.

import { SearchInput } from '@component-controls/components';

Default Render

Name
Description
Default
SearchInputOwnProps (6 properties)
onSearch

callback on change of search input. user can retrieve items in this callback

(search: string) => void | Promise<void>
-
onSelect

on select a search item.

(item: ItemType) => void
-
children

children is a render prop to allow custom rendering of items, one at a time

((props: SearchBoxCallbackProps<ItemType>) => ReactNode) | (((props: SearchBoxCallbackProps<ItemType>) => ReactNode) & string) | ... 5 more ... | (((props: SearchBoxCallbackProps<...>) => ReactNode) & ReactPortal)
-
items

items array

ItemType[]
[]
popoverProps

customize the popover

PopoverProps
-
render

custom renver of the search items popup

(rendered: ReactNode) => ReactNode
rendered => rendered
InputHTMLAttributes (34 properties)
SpaceProps (28 properties)
HTMLAttributes (43 properties)
Attributes (1 properties)
AriaAttributes (48 properties)
DOMAttributes (159 properties)
BoxOwnProps (4 properties)
BackgroundColorProps (2 properties)
OpacityProps (1 properties)

package
imports
peer
SearchIcon
react
^17.0.1
useStateuseEffectReactNode
*
scrollIntoView
theme-ui
^0.6.0-alpha.7
jsxInputPropsInputBox

file
imports
"../Popover"
PopoverPopoverProps
"../Keyboard"
KeyboardDOWN_ARROWUP_ARROWRETURNESCTAB

Stories

Overview

Placeholder

Customize