base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[autocomplete][combobox] Expose `[data-popup-side]` attribute on `Input`

Open sreehari-credhive opened this issue 1 year ago • 3 comments

Feature request

Summary

Currently, the Combobox input does not expose any data-[side] property. Because of this, there's no straightforward way to style the input based on the popup's position (top, bottom, etc.).

If Base UI could expose a property like data-[popup-side]="top" on the input element, it would allow developers to conditionally style the input depending on where the popup opens.

Examples in other libraries

Motivation

I’m trying to create a seamless visual merge between the input and the popup — with no visible gap. To achieve this, I remove the input’s bottom border and bottom border-radius when the popup opens below.

However, when the popup opens above the input, this styling breaks. With data-[popup-side], I could easily handle both cases:

sreehari-credhive avatar Oct 06 '25 05:10 sreehari-credhive

Follow up

  • can we add data-empty attribute in input

sreehari-credhive avatar Oct 06 '25 11:10 sreehari-credhive

hi, could i work on this?

wojtowicz-artur avatar Oct 21 '25 17:10 wojtowicz-artur

This feature will be available in the next npm release of Base UI.

In the meantime, you can try it out on our Canary release channel:

npm i https://pkg.pr.new/@base-ui-components/react@2926

github-actions[bot] avatar Oct 24 '25 08:10 github-actions[bot]