import { SyntheticEvent } from 'react'; import { ComponentWithAs as _ } from '@chakra-ui/react'; import { InputProps } from '../Input'; import type { TagProps } from '../Tag'; export interface TagInputProps extends Omit { /** Value of the controlled input. */ value?: string[]; /** * Callback for when the value changes. * @param value - The new value. */ onChange?: (value: string[]) => void; /** Default value of the uncontrolled input. */ defaultValue?: string[]; /** Color scheme to assign to the created tags */ tagColorScheme?: TagProps['colorScheme']; /** Keys that will trigger the creation of new tags. Defaults to `['Enter', ',', ' ']` */ keyDownKeys?: string[]; /** * Optional function to call to validate created tags. * Should return `true` if tag is valid. * If no function is provided, all tags are considered valid. */ tagValidation?: (tag: string) => boolean; /** * Optional function to call when input is blurred. */ onBlur?: (event: SyntheticEvent) => void; /** * If true, duplicate tags will not be created. Defaults to `true`. */ preventDuplicates?: boolean; /** Separator used to split a single input into multiple tags. Defaults to `,` */ splitTagSeparator?: string | null; } export declare const TagInput: _<"input", TagInputProps>;