[autocomplete][combobox] Expose `[data-popup-side]` attribute on `Input`
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:
Follow up
- can we add
data-emptyattribute in input
hi, could i work on this?
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