Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Tippy Logo

Tippy.js

v6.3.7

Customization

tippy() takes an object of optional props (configuration properties) as asecond argument to customize your tippies:

tippy('button',{duration:0,arrow:false,delay:[1000,200],});

These can also be specified on the element using data attributes:

<buttondata-tippy-duration="0"data-tippy-arrow="false"data-tippy-delay="[1000, 200]"> Text</button>

Note

Only JSON is valid in attributes.

#Mixing attributes and props

It can be useful to use the function for "global" config and choose attributesfor individual config here and there:

<button>Default</button><buttondata-tippy-content="hello">I have my own content</button><buttondata-tippy-arrow="true">I have my own option</button>
// Global config for all <button>stippy('button',{content:'Global content',trigger:'click',});

#Default props

Often you don't want to specify props over and over again when initializingtooltips. You can set the default props for every new tippy instance with thetippy.setDefaultProps() method:

tippy.setDefaultProps({delay:50});

[8]ページ先頭

©2009-2025 Movatter.jp