> For the complete documentation index, see [llms.txt](https://docs.quantumbyte.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quantumbyte.ai/home/quantumbyte-v2.0/3.microsites-1/8.ui/4.components/28.popup.md).

# Popup

### Popup Props <a href="#popup-props" id="popup-props"></a>

| Name      | Type    | Default                               | Description                                                 |
| --------- | ------- | ------------------------------------- | ----------------------------------------------------------- |
| backdrop  | boolean | true                                  | Enables Popup backdrop (dark semi transparent layer behind) |
| colors    | object  |                                       | Object with Tailwind CSS colors classes                     |
| colors.bg | string  | 'bg-white dark:bg-black'              | Popup bg color                                              |
| component | string  | 'div'                                 | Component's HTML Element                                    |
| opened    | boolean | false                                 | Allows to open/close Popup and set its initial state        |
| size      | string  | 'w-screen h-screen md:w-160 md:h-160' | Tailwind CSS size classes                                   |

### Popup Events

| Name          | Type        | Description                       |
| ------------- | ----------- | --------------------------------- |
| backdropclick | function(e) | Click handler on backdrop element |

### Examples

{% tabs %}
{% tab title="Vue" %}

```typescript
<template>
  <i-page>
    <i-navbar title="Popup" />

    <i-block strong class="space-y-4">
      <p>
        Popup is a modal window with any HTML content that pops up over App's
        main content. Popup as all other overlays is part of so called
        "Temporary Views".
      </p>
      <p>
        <i-button @click="() => (popupOpened = true)">Open Popup</i-button>
      </p>
    </i-block>

    <i-popup :opened="popupOpened" @backdropclick="() => (popupOpened = false)">
      <i-page>
        <i-navbar title="Popup">
          <template #right>
            <i-link navbar @click="() => (popupOpened = false)"> Close </i-link>
          </template>
        </i-navbar>
        <i-block class="space-y-4">
          <p>
            Here comes popup. You can put here anything, even independent view
            with its own navigation. Also not, that by default popup looks a bit
            different on iPhone/iPod and iPad, on iPhone it is fullscreen.
          </p>
          <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
            faucibus mauris leo, eu bibendum neque congue non. Ut leo mauris,
            eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus,
            viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis
            dignissim. Suspendisse non nisl semper tellus malesuada suscipit eu
            et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare
            consequat nunc viverra pellentesque. Aenean semper eu massa sit amet
            aliquam. Integer et neque sed libero mollis elementum at vitae
            ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a
            faucibus lectus.
          </p>
          <p>
            Duis ut mauris sollicitudin, venenatis nisi sed, luctus ligula.
            Phasellus blandit nisl ut lorem semper pharetra. Nullam tortor nibh,
            suscipit in consequat vel, feugiat sed quam. Nam risus libero,
            auctor vel tristique ac, malesuada ut ante. Sed molestie, est in
            eleifend sagittis, leo tortor ullamcorper erat, at vulputate eros
            sapien nec libero. Mauris dapibus laoreet nibh quis bibendum. Fusce
            dolor sem, suscipit in iaculis id, pharetra at urna. Pellentesque
            tempor congue massa quis faucibus. Vestibulum nunc eros, convallis
            blandit dui sit amet, gravida adipiscing libero.
          </p>
        </i-block>
      </i-page>
    </i-popup>
  </i-page>
</template>
<script>
  import { ref } from 'vue';
  import {
    iPage,
    iNavbar,
    iNavbarBackLink,
    iPopup,
    iBlock,
    iLink,
    iButton,
  } from 'ina-ui/vue';

  export default {
    components: {
      iPage,
      iNavbar,
      iNavbarBackLink,
      iPopup,
      iBlock,
      iLink,
      iButton,
    },
    setup() {
      const popupOpened = ref(false);
      return {
        popupOpened,
      };
    },
  };
</script>
```

{% endtab %}

{% tab title="React" %}

```js
import React, { useState } from 'react';
import {
  Page,
  Navbar,
  NavbarBackLink,
  Popup,
  Block,
  Link,
  Button,
} from 'ina-ui/react';

export default function PopupPage() {
  const [popupOpened, setPopupOpened] = useState(false);
  return (
    <Page>
      <Navbar
        title="Popup"
        />

      <Block strong className="space-y-4">
        <p>
          Popup is a modal window with any HTML content that pops up over App's
          main content. Popup as all other overlays is part of so called
          "Temporary Views".
        </p>
        <p>
          <Button onClick={() => setPopupOpened(true)}>Open Popup</Button>
        </p>
      </Block>

      <Popup opened={popupOpened} onBackdropClick={() => setPopupOpened(false)}>
        <Page>
          <Navbar
            title="Popup"
            right={
              <Link navbar onClick={() => setPopupOpened(false)}>
                Close
              </Link>
            }
          />
          <Block className="space-y-4">
            <p>
              Here comes popup. You can put here anything, even independent view
              with its own navigation. Also not, that by default popup looks a
              bit different on iPhone/iPod and iPad, on iPhone it is fullscreen.
            </p>
            <p>
              Lorem ipsum dolor sit amet, consectetur adipiscing elit.
              Suspendisse faucibus mauris leo, eu bibendum neque congue non. Ut
              leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in
              lacus faucibus, viverra ipsum pulvinar, molestie arcu. Etiam
              lacinia venenatis dignissim. Suspendisse non nisl semper tellus
              malesuada suscipit eu et eros. Nulla eu enim quis quam elementum
              vulputate. Mauris ornare consequat nunc viverra pellentesque.
              Aenean semper eu massa sit amet aliquam. Integer et neque sed
              libero mollis elementum at vitae ligula. Vestibulum pharetra sed
              libero sed porttitor. Suspendisse a faucibus lectus.
            </p>
            <p>
              Duis ut mauris sollicitudin, venenatis nisi sed, luctus ligula.
              Phasellus blandit nisl ut lorem semper pharetra. Nullam tortor
              nibh, suscipit in consequat vel, feugiat sed quam. Nam risus
              libero, auctor vel tristique ac, malesuada ut ante. Sed molestie,
              est in eleifend sagittis, leo tortor ullamcorper erat, at
              vulputate eros sapien nec libero. Mauris dapibus laoreet nibh quis
              bibendum. Fusce dolor sem, suscipit in iaculis id, pharetra at
              urna. Pellentesque tempor congue massa quis faucibus. Vestibulum
              nunc eros, convallis blandit dui sit amet, gravida adipiscing
              libero.
            </p>
          </Block>
        </Page>
      </Popup>
    </Page>
  );
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.quantumbyte.ai/home/quantumbyte-v2.0/3.microsites-1/8.ui/4.components/28.popup.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.
