---
title: Modal
description: A modal is a dialog that overlays the primary content with a window, drawing the user's attention exclusively to specific information.
labels: ["requires interaction", "click"]
author: morphhyy
---

<PreviewContainer>
  <Modal />
</PreviewContainer>

## Installation

<Steps>
<Step>Install dependencies</Step>

```bash
npm install framer-motion lucide-react
```

<Step>Run the following command</Step>

It will create a new file called `modal.tsx` inside the `components/animata/overlay` directory.

```bash
mkdir -p components/animata/overlay && touch components/animata/overlay/modal.tsx
```

<Step>Paste the code</Step>

Open the newly created file and paste the following code:

```jsx file=<rootDir>/animata/overlay/modal.tsx

```

</Steps>

## Credits

Built by [Bibek Bhattarai](https://github.com/morphhyy)

Inspired by [Chakra UI](https://v2.chakra-ui.com/docs/components/modal/usage)
