Skip to content

[Select] Different hover and focus state for Select.Item #3279

@sarthakmalik0810

Description

@sarthakmalik0810

Get help

I am trying to get different focus and hover states for Select.Item. Very similar to #2731

I am using data-highlighted and a combination of :hover state. Now when I select an option and the select menu closes, and when I open it again data-highlighted is applied on the selected option (or the last selected option for a multi select).

Screen.Recording.2025-11-20.at.9.18.22.PM.mov

I don't want the marker style on the selected item when I open the select again.

Here is a reproduction link - https://stackblitz.com/edit/19hu8jg4-tkjc2mzr?file=src%2FApp.tsx

Is there a better way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions