🚀  Astro — Tooltips

NPM Downloads ISC License PRs Welcome
Astro TypeScript Prettier EditorConfig ESLint

Progressively enhanced.
This component globally override regular title attributes on all links with Tippy.js tooltips.

📦  Installation

pnpm i astro-tooltips

🛠  Usage

---
import { Tooltips } from 'astro-tooltips';
// ...
---

Global settings: see all properties on Tippy documentation.

<!-- ... -->
<head>
  <!-- Place component inside `HEAD` tag -->

  <!-- All properties are optional, extends `TippyProps` typings -->
  <Tooltips interactive={false} delay={[15, 14000]} />

  <!-- ... -->
</head>

Use:

<!-- Use the regular title attribute on A tags -->
<a href="#" title="Hello!">Tooltip link</a>

<!-- Or anywhere else -->

<div title="Salut!">Tooltip static element</div>

Per tooltip global settings override:

// Tooltip placement control
<a href="#" title="Hello!" data-tooltip-placement="left">Tooltip left</a>

// Interactivity control
<a href="#" title="Hello!" data-tooltip-interactive="false">Tooltip left</a>

Theming

.tippy-box[data-theme='default'] {
  background-color: var(--vscode-menu-background);
  color: var(--vscode-badge-foreground);
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 0.15rem;
  padding: 0.5rem;
  word-wrap: break-word;
}

To do

<div class="git-footer">


LIVE DEMO  🎭  DOCUMENTATION WEBSITE ⎋

Live demo website

code.juliancataldo.com


🔗  JulianCataldo.com

</div>

astro-tooltips - Installation

To install astro-tooltips via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install astro-tooltips --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install astro-tooltips

Learn more about the config option.

PNPM

pnpm install astro-tooltips --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install astro-tooltips --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

astro-tooltips - Download

Download Tarball (v0.6.2)

Integrity sha512-I9uXbchctnRqbc0mnxKcBRfweMuql/U+619+MzNvq3kANc7xthOXj6cMNgAkTaXoHJLdFMKL3Fx6vB5cyiiRXg==
SHASUM e1b77f1cd2ad0bb3f5fb5b4e80f363fbfe50af85
Tarball https://js.registry.sudovanilla.org/astro-tooltips/-/astro-tooltips-0.6.2.tgz