Skip to main content

Search

Search is a simple component derived from the Text Input component and Button component.

import { useState } from 'react';
import { Search } from 'chic-ui';

const [value, setValue] = useState('');
<Search
placeholder="Search something..."
width="400px"
value={value}
onChange={(e) => setValue(e.currentTarget.value)}
/>;

API

import { Search } from 'chic-ui';
NameTypeDefaultDescription
srcstringPath of the image for the avatar
namestringAlphabets for the avatar
isActivebooleanfalseActive state for the avatar
classNamestringProvide external classnames to the component
styleReact.CSSPropertiesOverride default styling of the component