import { ComponentWithAs as _, InputProps } from '@chakra-ui/react'; export interface SearchbarProps extends InputProps { /** * Function to be invoked when user presses enter (to search). * @param searchValue value of the search input */ onSearch?: (searchValue: string) => void; /** * Whether the searchbar is expanded or not by default. * @note If this is not provided, the searchbar will be collapsed by default. */ defaultIsExpanded?: boolean; /** * Whether the searchbar is expanded or not. * If provided, expansion state will be a controlled input. */ isExpanded?: boolean; /** * Function to be invoked when the searchbar is expanded or collapsed. * If provided, expansion state will be a controlled input. * @note This should be provided if the `isExpanded` prop is provided. * @note Will be invoked with `true` when the searchbar icon is clicked, and with * `false` when the user closes the searchbar. */ onExpansion?: (isExpanded: boolean) => void; /** * Whether to show the clear button. * @note If this is provided, the clear button will only be shown if the searchbar is expanded. */ showClearButton?: boolean; /** * Whether to collapse the searchbar when the clear button is clicked. * @note If this is provided, the searchbar will only collapse if the `showClearButton` prop is also provided. */ collapseOnClear?: boolean; /** * If provided, the searchbar will be focused when the user expands the input. * Defaults to `true`. */ focusOnExpand?: boolean; } export declare const Searchbar: _<"input", SearchbarProps>;