TidalUI

Global search preview

Search grouped workspace records, recent items and actions in one modal surface.

pro · Navigation · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/global-search

Import components/ui/tidal.css, components/ui/global-search.css. Wrap installed components in tidal-scope.

Preview

Global search component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/global-search.css";
import{TidalGlobalSearch}from"./components/ui/global-search";
export default(p:Parameters<typeof TidalGlobalSearch>[0])=><div className="tidal-scope"><TidalGlobalSearch {...p}/></div>;

API and props

TidalGlobalSearch.description (required)
ReactNode

Required description value accepted by this exported component.

TidalGlobalSearch.groups (required)
ReadonlyArray<TidalGlobalSearchGroup>

Required groups value accepted by this exported component.

TidalGlobalSearch.onOpenChange (required)
(open: boolean) => void

Callback invoked when the open change interaction is proposed.

TidalGlobalSearch.onQueryChange (required)
(query: string, event: ChangeEvent<HTMLInputElement>) => void

Callback invoked when the query change interaction is proposed.

TidalGlobalSearch.open (required)
boolean

Required open value accepted by this exported component.

TidalGlobalSearch.query (required)
string

Required query value accepted by this exported component.

TidalGlobalSearch.title (required)
ReactNode

Required title value accepted by this exported component.

TidalGlobalSearch.closeButtonProps
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "aria-label" | "children" | "dangerouslySetInnerHTML"> | undefined

Optional close button props value accepted by this exported component.

TidalGlobalSearch.closeButtonRef
Ref<HTMLButtonElement> | undefined

Optional close button ref value accepted by this exported component.

TidalGlobalSearch.closeLabel
string | undefined

Optional close label value accepted by this exported component.

TidalGlobalSearch.defaultTriggerLabel
ReactNode

Optional default trigger label value accepted by this exported component.

TidalGlobalSearch.defaultTriggerProps
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "dangerouslySetInnerHTML"> | undefined

Optional default trigger props value accepted by this exported component.

TidalGlobalSearch.defaultTriggerRef
Ref<HTMLButtonElement> | undefined

Optional default trigger ref value accepted by this exported component.

TidalGlobalSearch.dir
"ltr" | "rtl" | undefined

Optional dir value accepted by this exported component.

TidalGlobalSearch.emptyContent
ReactNode

Optional empty content value accepted by this exported component.

TidalGlobalSearch.error
ReactNode

Optional error value accepted by this exported component.

TidalGlobalSearch.inputLabel
string | undefined

Optional input label value accepted by this exported component.

TidalGlobalSearch.inputPlaceholder
string | undefined

Optional input placeholder value accepted by this exported component.

TidalGlobalSearch.inputProps
Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "children" | "dangerouslySetInnerHTML"> | undefined

Optional input props value accepted by this exported component.

TidalGlobalSearch.inputRef
Ref<HTMLInputElement> | undefined

Optional input ref value accepted by this exported component.

TidalGlobalSearch.loading
boolean | undefined

Optional loading value accepted by this exported component.

TidalGlobalSearch.loadingLabel
string | undefined

Optional loading label value accepted by this exported component.

TidalGlobalSearch.onResultSelect
((resultId: string, result: TidalGlobalSearchResult, event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined

Callback invoked when the result select interaction is proposed.

TidalGlobalSearch.overlayProps
Omit<Omit<Dialog.DialogOverlayProps & RefAttributes<HTMLDivElement>, "ref">, "children" | "dangerouslySetInnerHTML" | "asChild" | "forceMount"> | undefined

Optional overlay props value accepted by this exported component.

TidalGlobalSearch.overlayRef
Ref<HTMLDivElement> | undefined

Optional overlay ref value accepted by this exported component.

TidalGlobalSearch.portalContainer
HTMLElement | null | undefined

Optional portal container value accepted by this exported component.

TidalGlobalSearch.recentItems
ReadonlyArray<TidalGlobalSearchResult> | undefined

Optional recent items value accepted by this exported component.

TidalGlobalSearch.recentLabel
string | undefined

Optional recent label value accepted by this exported component.

TidalGlobalSearch.resultsLabel
string | undefined

Optional results label value accepted by this exported component.

TidalGlobalSearch.shortcutKeys
ReadonlyArray<TidalShortcutKey> | undefined

Optional shortcut keys value accepted by this exported component.

TidalGlobalSearch.showKeyboardHint
boolean | undefined

Optional show keyboard hint value accepted by this exported component.

TidalGlobalSearch.theme
"light" | "dark" | undefined

Optional theme value accepted by this exported component.

TidalGlobalSearch.trigger
ReactElement<unknown, string | JSXElementConstructor<any>> | null | undefined

Optional trigger value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas