Skip to main content
Autocompleteโ€™s detached mode aims at reproducing native experiences on the device youโ€™re using. It doesnโ€™t display a native input with results in a drop-down menu, but a search button with results in a modal. This allows a more immersive experience where the full viewport is used to display results. Autocomplete's detached mode on mobile You can enable detached mode on small screens, on touch devices, or always enable it, as seen on DocSearch.

Detached full screen design

Autocompleteโ€™s default behavior enables detached mode when the screen is below 500 pixels wide. You can customize this behavior with the detachedMediaQuery option.

Detached modal design

Once youโ€™re in detached mode, you can choose to enable the modal design, which shows the website in the background covered by an overlay. You can set when to enable this design with the --aa-detached-modal-media-query CSS variable, which defaults to (min-width: 500px). Autocomplete's detached mode on desktop

Manually control detached mode

  • To always turn on detached mode, set detachedMediaQuery: ''.
  • To always turn off detached mode, set detachedMediaQuery: 'none'.
โŒ˜I