Skip to content

Allow different behavior for the search button on desktop and mobile, when used inside the navigation block #57614

Open
@asafm7

Description

Currently, it is difficult to create a header search field experience that looks good and makes sense both on desktop and mobile.

Allowing different behaviors for the search button on desktop and mobile might help.

For example, allow to use "just button" on the desktop, but have the field pre-shown on the mobile menu.

Maybe different ordering: having the search as the last item on desktop, but as the first on mobile.

Also, on mobile, it might look better if the search field expands to the whole width of the menu.

A modal overlay can also be a good responsive solution.

Of course, this can be done with a custom code or plugins. But as a header search button/field is quite common, it feels like something that should be handled sufficiently by WordPress core.

Also, when the navigation block contains a search button, consider using such an icon for the mobile toggle:
image

Activity

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

Metadata

Assignees

No one assigned

    Labels

    [Block] SearchAffects the Search Block - used to display a search field[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions