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.

On this page

CSearchButton#

import { CSearchButton } from '@coreui/react'
// or
import CSearchButton from '@coreui/react/src/components/search-button/CSearchButton'
PropertyDefaultType
children#-ReactNode

Content to customize the full button body.

className#-string

A string of all className you want applied to the base component.

icon#-ReactNode

Custom icon displayed before the placeholder text.

onTrigger#-() => void

Callback fired when the component is activated by click or keyboard shortcut.

placeholder#SearchReactNode

Placeholder content rendered inside .search-button-placeholder.

preventDefault#trueboolean

Prevent the browser's default behavior when the configured shortcut matches.

shortcut#meta+/,ctrl+/string

Comma-separated shortcut list. The component matches all configured shortcuts and renders the platform-preferred one.