Skip to content

[EuiSearchBar] Add top-level compressed prop, for both the search input and filter group #9712

Description

@acstll

Requestor

@acstll

Problem Statement

EuiSearchBar renders its filters inside an EuiFilterGroup, but there is no way to set compressed on that group from the EuiSearchBar API. EuiFilterGroup already supports a compressed prop that reduces its height to match compressed form controls, but it is hardcoded without that prop in EuiSearchBarFilters. The search input (EuiFieldSearch) can be made compressed via box={{ compressed: true }}, but there is no equivalent for the filter buttons — and no single prop that makes the whole bar compact at once.

Proposed Solution

Add a top-level compressed prop to EuiSearchBarProps that drives both the search input and the filter group:

<EuiSearchBar filters={myFilters} compressed />

Internally, this would forward compressed to EuiFieldSearch (via box) and to EuiFilterGroup (via EuiSearchBarFilters). A consumer who needs fine-grained control can still override via box={{ compressed: false }}.

Use Case

Any product that places EuiSearchBar with filters inside a toolbar or header area that uses compressed-size form controls. Today, consumers must pass box={{ compressed: true }} for the input and have no opt-in at all for the filter buttons, leaving them at full height with no workaround short of CSS overrides.

Value / Impact

  • Enables visual consistency in dense or compact layouts with a single prop.
  • Low-effort change: EuiFilterGroup and EuiFieldSearch already support compressed — it just needs to be exposed one level up and threaded through.
  • It is very unlikely a consumer would want the input compressed but not the filters, or vice versa, so a unified prop matches the real-world use case.

Urgency

Nice-to-have; no hard deadline. Currently blocked by a missing API, not missing functionality in the underlying components.

Do alternatives or workarounds exist?

Partially. box={{ compressed: true }} compresses the search input, but there is no equivalent for the filter group. CSS overrides targeting .euiFilterGroup are the only current option for the filters, which is not stable.

Related code or customizations

Activity

  1. added
    help wanted
    low hanging fruit
    on Jun 4, 2026
  2. github-actions commented on Jun 4, 2026

    @github-actions

    👋 Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

  3. changed the title [-]EuiSearchBar: add top-level prop for both the search input and filter group[/-] [+][EuiSearchBar] Add top-level `compressed` prop, for both the search input and filter group[/+] on Jun 4, 2026
  4. MannXo commented on Jun 5, 2026

    @MannXo
    Contributor

    Interested in working on this. Can I be assigned?

  5. JasonStoltz commented on Jun 17, 2026

    @JasonStoltz
    Contributor

    @MannXo We will accepts PRs for anything labeled with help wanted. We will not assign issues outside of Elastic. Feel free to contribute a PR. See contributing to EUI for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedlow hanging fruit

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions