config | PowerSearchConfig · requiredConfiguration defining available fields, operators, and their value types. |
|---|
filters | ReadonlyArray<PowerSearchFilter> · requiredCurrently active filters. |
|---|
onChange | (filters: ReadonlyArray<PowerSearchFilter>, changeType: 'add' | 'edit' | 'remove', index: number) => void · requiredCalled when filters change. changeType is 'add', 'edit', or 'remove'. index is the affected filter's position. |
|---|
label | string · default 'Search'Accessible label for the search input. |
|---|
isLabelHidden | boolean · default trueVisually hides the label while keeping it accessible. |
|---|
placeholder | string · default 'Search...'Placeholder text shown when no filters are selected. |
|---|
hasAutoFocus | boolean · default falseAuto-focus the input on mount. |
|---|
hasClear | boolean · default trueShow a clear-all button for removing all filters. |
|---|
isReadOnly | boolean · default falsePrevent adding, editing, or removing filters. |
|---|
isDisabled | boolean · default falseDisables the entire component. |
|---|
disabledMessage | stringExplains why the search is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the input focusable via aria-disabled (input stays blocked). Use this instead of wrapping a disabled PowerSearch in Tooltip. Disabled controls swallow the hover events an external Tooltip needs. |
|---|
status | {type: 'warning' | 'error' | 'success', message?: string}Validation status object with type and optional message. |
|---|
startIcon | ReactNode | IconTypeIcon to display at the start of the input, before any filter tokens. Forwarded to the internal Tokenizer. Accepts a semantic icon name, an SVG icon component, or a ReactNode directly. |
|---|
statusVariant | 'attached' | 'detached' · default 'attached'How the status message is placed relative to the input. attached overlaps directly below the input (bordered treatment); detached floats below as a separate element with spacing. |
|---|
maxTokenLength | number · default 40Max character length for filter value display in tokens. |
|---|
maxOperatorMenuItems | number · default 10Maximum suggestions shown in string and entity value typeaheads. Does not affect the main field search menu or enum value menus. |
|---|
maxSearchResults | number · default 10Max ranked results for a non-empty query. Does not affect a field value editor. Browsing with an empty query shows up to 1,000 fields. |
|---|
menuWidth | numberWidth in pixels for the main field/search menu. Does not affect field value editors. |
|---|
popoverSaveButtonLabel | string · default 'Apply'Label for the save button in the edit popover. |
|---|
timezoneID | stringTimezone ID for date formatting (e.g. "America/New_York"). |
|---|
handleRef | Ref<PowerSearchHandle> |
|---|
endContent | ReactNodeContent to display at the end of the input row. Useful for action buttons or other controls. |
|---|
resultCount | number | stringNumber of results matching the current filters. When a number, formatted as "N results". When a string, displayed as-is. Changes are announced to screen readers via a polite live region. |
|---|
size | 'sm' | 'md' | 'lg' · default 'md'Size of the search input and tokens. |
|---|
menuWidth | numberMaximum width for the operator/value dropdown menu in pixels. |
|---|
maxOperatorMenuItems | numberMaximum number of items displayed in the operator dropdown. |
|---|
tokenOverflowBehavior | 'none' | 'unfocusedInline' | 'unfocusedLayer' · default 'none'Controls how tokens overflow when the container is too narrow. Forwarded to Tokenizer. |
|---|
onFocus | (e: React.FocusEvent) => voidFires when focus enters the search input. |
|---|
onBlur | (e: React.FocusEvent) => voidFires when focus leaves the search input. |
|---|
xstyle | StyleXStylesStyleX styles for layout customization. Must be a stylex.create() value. |
|---|