#5205·base-ui

[combobox] Predicate function for `autoHighlight`

Author: vladmorozCreated Jul 10, 2026Updated Sep 25, 2026
Labelstype: new featurecomponent: combobox

Feature request

Would like to have a way to decide on the fly whether the first filtered item should be highlighted.

Currently we accomplish this via a bun patched version of the Combobox where autoHighlight accepts a function like (item) => boolean

https://github.com/user-attachments/assets/bd9adb3e-1e59-4242-bafa-f271588c855b

In Paper this is so that if you are typing in a value into the input, we highlight theme tokens only for exact matches, otherwise the value is treated like normal text.

For the user it means that if they type "1" and press Enter they wouldn't get a token for "12", but if they type in "12" and a matching token exists, that one is selected on Enter.