> 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/26.panel.md).

# Panel / Side

### Panel Props <a href="#panel-props" id="panel-props"></a>

| Name      | Type              | Default                  | Description                                                 |
| --------- | ----------------- | ------------------------ | ----------------------------------------------------------- |
| backdrop  | boolean           | true                     | Enables Panel backdrop (dark semi transparent layer behind) |
| colors    | object            |                          | Object with Tailwind CSS colors classes                     |
| colors.bg | string            | 'bg-white dark:bg-black' | Panel bg color                                              |
| component | string            | 'div'                    | Component's HTML Element                                    |
| floating  | boolean           | false                    | When enabled opened panel will have extra spaces from sides |
| opened    | boolean           | false                    | Allows to open/close Panel and set its initial state        |
| side      | 'left' \| 'right' | 'left'                   | Panel side                                                  |
| size      | string            | 'w-72 h-screen'          | Tailwind CSS size classes                                   |

### Panel Events

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

### Examples

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

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

    <i-block strong-ios outline-ios class="space-y-4">
      <p>
        ina-ui UI comes with 2 panels (on left and on right), both are optional.
        You can put absolutely anything inside: data lists, forms, custom
        content, etc.
      </p>
    </i-block>
    <i-block strong-ios outline-ios class="flex space-x-4 rtl:space-x-reverse">
      <i-button @click="() => (leftPanelOpened = true)">Left Panel</i-button>
      <i-button @click="() => (rightPanelOpened = true)">Right Panel</i-button>
    </i-block>

    <i-block-title>Floating Panels</i-block-title>
    <i-block strong-ios outline-ios class="flex space-x-4 rtl:space-x-reverse">
      <i-button @click="() => (leftFloatingPanelOpened = true)"
        >Left Panel</i-button
      >
      <i-button @click="() => (rightFloatingPanelOpened = true)"
        >Right Panel</i-button
      >
    </i-block>

    <i-panel
      side="left"
      :opened="leftPanelOpened"
      @backdropclick="() => (leftPanelOpened = false)"
    >
      <i-page>
        <i-navbar title="Left Panel">
          <template #right>
            <i-link navbar @click="() => (leftPanelOpened = false)">
              Close
            </i-link>
          </template>
        </i-navbar>
        <i-block class="space-y-4">
          <p>Here comes left panel.</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>
        </i-block>
      </i-page>
    </i-panel>

    <i-panel
      side="right"
      :opened="rightPanelOpened"
      @backdropclick="() => (rightPanelOpened = false)"
    >
      <i-page>
        <i-navbar title="Right Panel">
          <template #right>
            <i-link navbar @click="() => (rightPanelOpened = false)">
              Close
            </i-link>
          </template>
        </i-navbar>
        <i-block class="space-y-4">
          <p>Here comes right panel.</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-panel>

    <i-panel
      side="left"
      floating
      :opened="leftFloatingPanelOpened"
      @backdropclick="() => (leftFloatingPanelOpened = false)"
    >
      <i-page class="no-safe-areas-top no-safe-areas-bottom">
        <i-navbar title="Left Panel">
          <template #right>
            <i-link navbar @click="() => (leftFloatingPanelOpened = false)">
              Close
            </i-link>
          </template>
        </i-navbar>
        <i-block class="space-y-4">
          <p>Here comes left panel.</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>
        </i-block>
      </i-page>
    </i-panel>

    <i-panel
      side="right"
      floating
      :opened="rightFloatingPanelOpened"
      @backdropclick="() => (rightFloatingPanelOpened = false)"
    >
      <i-page class="no-safe-areas-top no-safe-areas-bottom">
        <i-navbar title="Right Panel">
          <template #right>
            <i-link navbar @click="() => (rightFloatingPanelOpened = false)">
              Close
            </i-link>
          </template>
        </i-navbar>
        <i-block class="space-y-4">
          <p>Here comes right panel.</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-panel>
  </i-page>
</template>
<script>
  import { ref } from 'vue';
  import {
    iPage,
    iNavbar,
    iNavbarBackLink,
    iPanel,
    iBlock,
    iBlockTitle,
    iLink,
    iButton,
  } from 'ina-ui/vue';

  export default {
    components: {
      iPage,
      iNavbar,
      iNavbarBackLink,
      iPanel,
      iBlock,
      iBlockTitle,
      iLink,
      iButton,
    },
    setup() {
      const leftPanelOpened = ref(false);
      const rightPanelOpened = ref(false);
      const leftFloatingPanelOpened = ref(false);
      const rightFloatingPanelOpened = ref(false);
      return {
        leftPanelOpened,
        rightPanelOpened,
        leftFloatingPanelOpened,
        rightFloatingPanelOpened,
      };
    },
  };
</script>
```

{% endtab %}

{% tab title="React" %}

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

export default function SidePanelsPage() {
  const [leftPanelOpened, setLeftPanelOpened] = useState(false);
  const [rightPanelOpened, setRightPanelOpened] = useState(false);

  const [leftFloatingPanelOpened, setLeftFloatingPanelOpened] = useState(false);
  const [rightFloatingPanelOpened, setRightFloatingPanelOpened] =
    useState(false);
  return (
    <Page>
      <Navbar
        title="Panel / Side Panel"
        />

      <Block strongIos outlineIos className="space-y-4">
        <p>
          ina-ui UI comes with 2 panels (on left and on right), both are
          optional. You can put absolutely anything inside: data lists, forms,
          custom content, etc.
        </p>
      </Block>
      <Block
        strongIos
        outlineIos
        className="flex space-x-4 rtl:space-x-reverse"
      >
        <Button rounded onClick={() => setLeftPanelOpened(true)}>
          Left Panel
        </Button>
        <Button rounded onClick={() => setRightPanelOpened(true)}>
          Right Panel
        </Button>
      </Block>
      <BlockTitle>Floating Panels</BlockTitle>
      <Block
        strongIos
        outlineIos
        className="flex space-x-4 rtl:space-x-reverse"
      >
        <Button rounded onClick={() => setLeftFloatingPanelOpened(true)}>
          Left Panel
        </Button>
        <Button rounded onClick={() => setRightFloatingPanelOpened(true)}>
          Right Panel
        </Button>
      </Block>

      <Panel
        side="left"
        opened={leftPanelOpened}
        onBackdropClick={() => setLeftPanelOpened(false)}
      >
        <Page>
          <Navbar
            title="Left Panel"
            right={
              <Link navbar onClick={() => setLeftPanelOpened(false)}>
                Close
              </Link>
            }
          />
          <Block className="space-y-4">
            <p>Here comes left panel.</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>
          </Block>
        </Page>
      </Panel>

      <Panel
        side="right"
        opened={rightPanelOpened}
        onBackdropClick={() => setRightPanelOpened(false)}
      >
        <Page>
          <Navbar
            title="Right Panel"
            right={
              <Link navbar onClick={() => setRightPanelOpened(false)}>
                Close
              </Link>
            }
          />
          <Block className="space-y-4">
            <p>Here comes right panel.</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>
      </Panel>

      <Panel
        side="left"
        floating
        opened={leftFloatingPanelOpened}
        onBackdropClick={() => setLeftFloatingPanelOpened(false)}
      >
        <Page className="no-safe-areas-top no-safe-areas-bottom">
          <Navbar
            title="Left Panel"
            right={
              <Link navbar onClick={() => setLeftFloatingPanelOpened(false)}>
                Close
              </Link>
            }
          />
          <Block className="space-y-4">
            <p>Here comes left panel.</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>
          </Block>
        </Page>
      </Panel>

      <Panel
        side="right"
        floating
        opened={rightFloatingPanelOpened}
        onBackdropClick={() => setRightFloatingPanelOpened(false)}
      >
        <Page className="no-safe-areas-top no-safe-areas-bottom">
          <Navbar
            title="Right Panel"
            right={
              <Link navbar onClick={() => setRightFloatingPanelOpened(false)}>
                Close
              </Link>
            }
          />
          <Block className="space-y-4">
            <p>Here comes right panel.</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>
      </Panel>
    </Page>
  );
}

SidePanelsPage.title = 'Panel / Side Panels';
```

{% 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/26.panel.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.
