0.2.1 • Published 1 year ago

solid-tippy v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

solid-tippy

SolidJS bindings for Tippy.js

NPM JavaScript Style GuideOpen in CodeSandbox

Install

npm i tippy.js solid-tippy
yarn add tippy.js solid-tippy
pnpm add tippy.js solid-tippy

Usage

import { tippy, useTippy } from 'solid-tippy';

// As directive
<button
  use:tippy={{
    props: {
      content: 'This is a tooltip.',
    },
  }}
>
  Example
</button>

// as hook
const [anchor, setAnchor] = createSignal();

useTippy(anchor, {
  props: {
    content: 'This is a tooltip.',
  },
});

<button ref={anchor}>
  Example
</button>

Options

  • disabled: Disables the Tippy instance. Defaults to false.
  • hidden: Hides the Tippy instance. Defaults to false.
  • props: Props to be passed to the Tippy instance when creating or updating it. You can read more about it here.

Headless mode

You may use tippyHeadless or useTippyHeadless instead of tippy and useTippy for Headless Tippy instances.

License

MIT © lxsmnsyc

0.2.1

1 year ago

0.2.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago