Skip to content

Commit

Permalink
docs(concepts): add section to always enable/disable Detached mode
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Feb 17, 2021
1 parent 9a633e0 commit c02d99d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/website/docs/detached-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import Draft from './partials/draft.md'

<Draft />

<!-- When the [`detachedMediaQuery`](autocomplete-js#detachedMediaQuery) value is met, Autocomplete turns into detached mode. This mode replaces the regular dropdown for a fully immersive experience, as seen on native devices. -->

## What is Detached

Autocomplete Detached aims at reproducing native experiences on the device you're using. It doesn't display a native input with results in a dropdown, but a search button with results in a modal. This allows a more immersive experience where the full viewport is used to display results.
Expand All @@ -33,6 +31,10 @@ Once you're Detached, you can choose to enable the modal design, which shows the

![Modal](/img/screenshot-detached-modal.png)

## Bailing out of Detached Mode
## Always enable Detached Mode

To always enable Detached Mode, you can pass `detachedMediaQuery: ''`.

## Always disable Detached Mode

To disable Detached Mode, you can pass `detachedMediaQuery: ''`.
To always disable Detached Mode, you can pass `detachedMediaQuery: 'none'`.

0 comments on commit c02d99d

Please sign in to comment.