> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/app/displaysnippet.md).

# displaySnippet

## Description

Allows users to decide whether to show or hide a snippet modal on the screen.

## Input / Parameter

| Name    | Description                          | Input Type  | Default | Options           | Required |
| ------- | ------------------------------------ | ----------- | ------- | ----------------- | -------- |
| snippet | The snippet to be shown or hidden.   | String/Text | -       | -                 | Yes      |
| show    | To show or hide snippet.             | Boolean     | true    | true, false       | Yes      |
| effect  | The animation effect of the snippet. | String      | None    | None, Fade, Slide | No       |

## Output

Note: The page will be updated to show or hide the snippet.

## Example

In this example, we will show a snippet with slide effect.

### Steps

1. First, we will need to have a snippet to display or hide. Create one under the Snippet tab if you don't have any yet. In this example, we will be using a snippet named `Snippet1`.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-7cc9b10b50441bb7a85654d8fed56967587983f8%2FdisplaySnippet-step-1.png?alt=media)
2. Drag in a button, to show the snippet modal.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-25a2296fea49e38029edc145e614a73f9e8ae802%2FdisplaySnippet-step-2.png?alt=media)
3. In the event `press` of the button fill in the parameters as shown below for both buttons.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-007798bb4f83c3bae59a9f41ea773bc538982bc7%2FdisplaySnippet-step-3.png?alt=media)

### Result

1. Try clicking the show button on either Preview or Compiled App, the snippet modal will be shown and covering the screen.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-accd485eef9601bcd5e6b84b6fce69fb88b43ae1%2FdisplaySnippet-result-1.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-0be34ce99be4ac07b3af8cec9f27f0af6e9c3b68%2FdisplaySnippet-result-2.png?alt=media)

## Links

### Related Information

See also:

* Components
  * [Snippet](/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/app/displaysnippet.md)
