Requires David UI JS

Tailwind CSS Popover

David UI's Popover component delivers an interactive way to display contextual information or actions. Styled with Tailwind CSS, it supports customizable triggers, animations, and layouts for a seamless user experience.

Explore our responsive Popover component examples, styled with Tailwind CSS, ideal for enhancing functionality in your web or mobile projects.


Basic Popover

A simple and clean Popover component example, featuring a button trigger and a small content area. Ideal for providing quick information or additional context when interacting with a button or other elements.


Popover Placement

This example demonstrates the versatility of the Popover component with various placement options, including top, right, bottom, and left. Perfect for tailoring popover positions to suit different layouts and use cases.


Subscription Popover

An interactive Popover component designed for newsletter subscriptions. It includes an email input field and a subscribe button, making it a great addition for capturing user engagement in a compact, non-intrusive way.


Contact Popover

A detailed Popover component showcasing contact information, including name, role, company, phone, and email. Ideal for displaying a quick and accessible contact card in applications like CRM systems or directory lists.


Popover with Image

A visually rich Popover example that combines text and an image. Useful for highlighting key information alongside an accompanying visual element, such as product descriptions, profiles, or media content.


Profile Info Popover

A comprehensive Popover for displaying profile details, including an avatar, bio, and additional information like location and organization. Features a follow button for user interaction, making it perfect for social or professional networking platforms.


Popover with Description

A detailed Popover component tailored for repository or project information. Includes key details like a public/private tag, programming language, star rating, and verification status, making it ideal for use in developer tools or project management dashboards.


Required Script

The Popover component in david-ai requires JavaScript to handle the popover functionality and positioning. The library provides smooth transitions and toggle behavior through data attributes, powered by Popper.js for accurate positioning.

Installation

To use the Popover component in your project, you first need to install the david-ai library via npm:

Basic Usage

Using with Global Access

If you prefer, you can use the DavidAI global object instead of directly importing initPopovers:

Using with CDN

You can include david-ai via a CDN and initialize popover functionality globally in the browser. Add the following script to your HTML file:

HTML Code Example