Components Tooltip Tooltip Component

Tooltip Component

Tooltip Component with Skeuomorphism style, Complementary color scheme, Simple complexity, for E-commerce.

Preview

HTML Code

<div class="relative inline-block">
  <button class="bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded shadow-md dark:bg-gray-700 dark:hover:bg-gray-600 dark:text-gray-200">Hover over me</button>
  <div class="hidden absolute z-10 px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-700 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-600">
    Tooltip content
    <div class="tooltip-arrow"></div>
  </div>
</div>

<style>
.tooltip:hover + div {
  display: block;
  opacity: 1;
}

.tooltip-arrow,
.tooltip-arrow:after {
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}

.tooltip-arrow {
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-bottom-color: #4a5568;
}

.dark .tooltip-arrow {
  border-bottom-color: #4a5568;
}


.tooltip-arrow:after {
  bottom: 1px;
  margin-left: -5px;
  border-width: 5px;
  border-bottom-color: #4a5568;
}

.dark .tooltip-arrow:after {
  border-bottom-color: #4a5568;
}
</style>

Related Components

Tooltip Component

A neumorphic tooltip component with a complementary color scheme, moderate complexity, and responsive design with dark theme support, suitable for a blog or content consumption.

Open

Neumorphic Tooltip Component

A sophisticated Neumorphism-styled tooltip component suitable for business websites, employing vibrant colors and designed for dark mode support.

Open

Minimalist Tooltip

A minimalist and flat design tooltip component for blog/content websites, with monochromatic color scheme and simple layout. It is responsive and supports dark mode using Tailwind CSS.

Open