定制 blackbird/hyva-tooltip 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

blackbird/hyva-tooltip

最新稳定版本:1.0.7

Composer 安装命令:

composer require blackbird/hyva-tooltip

包简介

Easily add tooltips to your website

README 文档

README

A lightweight Magento 2 module to easily display tooltips in your Hyvä Theme.

Built on top of Floating UI, preconfigured and styled for common e-commerce use cases.

Installation

composer require blackbird/hyva-tooltip
php bin/magento setup:upgrade

This module depends on blackbird/external-resources-loader to automatically load the Floating UI library.

Usage

You can initialize the tooltip in different ways, depending on your needs:

<button id="button-<?= $uniqueId ?>"
        x-data="blackbird.tooltip({
            tooltipSelector: '#tooltip-<?= $uniqueId ?>',
        })"
>
    My button
</button>

<div id="tooltip-<?= $uniqueId ?>" blackbird-tooltip>My tooltip</div>
<button id="button-<?= $uniqueId ?>">My button</button>

<div id="tooltip-<?= $uniqueId ?>"
     blackbird-tooltip
     x-data="blackbird.tooltip({
         buttonSelector: '#button-<?= $uniqueId ?>',
     })"
>
    My tooltip
</div>
<div x-data="blackbird.tooltip({
         buttonSelector: '#button-<?= $uniqueId ?>',
         tooltipSelector: '#tooltip-<?= $uniqueId ?>',
     })">
</div>

<button id="button-<?= $uniqueId ?>">My button</button>
<div id="tooltip-<?= $uniqueId ?>" blackbird-tooltip>My tooltip</div>

Custom styling

You can override the tooltip style using Tailwind’s @layer utilities syntax:

@layer utilities {
    [blackbird-tooltip] {
        @apply bg-gray-light;
    }
}

Made for Hyvä. Simple, ready-to-use, and flexible. 🎉

统计信息

  • 总下载量: 2.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-07