# 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`.

   ![](/files/59ROBYjwQfEWoSNDNxP4)
2. Drag in a button, to show the snippet modal.

   ![](/files/lOXvgAyI5ui7ZnVXmVGn)
3. In the event `press` of the button fill in the parameters as shown below for both buttons.

   ![](/files/2AYYEDqeUuuzaux4mHIv)

### Result

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

   ![](/files/mccdzJhfGwvHpMroOnFp)

   ![](/files/fPZCzY8oLzPkEtYS8O17)

## Links

### Related Information

See also:

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/react-native/app/displaysnippet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
