React Search Button Component API
Search Button API
Explore the API reference for the React Search Button component and discover how to effectively utilize its props for customization.
import { CSearchButton } from '@coreui/react-pro'
| Property | Default | Type |
|---|
| children | - | ReactNode |
Content to customize the full button body. |
| className | - | string, undefined |
A string of all className you want applied to the base component. |
| icon | - | ReactNode |
Custom icon displayed before the placeholder text. |
| onTrigger | - | (() => void), undefined |
Callback fired when the component is activated by click or keyboard shortcut. |
| placeholder | Search | ReactNode |
Placeholder content rendered inside .search-button-placeholder. |
| preventDefault | true | boolean, undefined |
Prevent the browser's default behavior when the configured shortcut matches. |
| shortcut | meta+/,ctrl+/ | string, undefined |
Comma-separated shortcut list. The component matches all configured shortcuts and renders the platform-preferred one. |