11# css-only-tooltip
22
3+ A very lightweight tooltip utitlity library, made using only ` CSS ` with dynamic light and dark themes.
4+
35[ ![ Node.js Package] ( https://github.com/thoughtlessmind/css-only-tooltip/workflows/Node.js%20Package/badge.svg )] ( https://github.com/thoughtlessmind/css-only-tooltip )
46[ ![ NPM downloads] ( https://badgen.net/npm/dm/css-only-tooltip?icon=npm )] ( https://www.npmjs.com/package/css-only-tooltip )
57[ ![ License] ( https://badgen.net/npm/license/css-only-tooltip )] ( https://github.com/thoughtlessmind/css-only-tooltip/blob/main/LICENSE )
68![ minified size] ( https://badgen.net/bundlephobia/min/css-only-tooltip?color=pink )
79[ ![ npm version] ( https://badgen.net/npm/v/css-only-tooltip )] ( https://www.npmjs.com/package/css-only-tooltip )
810![ npm version] ( https://img.shields.io/github/languages/top/thoughtlessmind/css-only-tooltip )
911
10- A very lightweight tooltip utitlity library, made using only ` CSS ` .
1112
1213## Insatallation
13- - Using npm
14+ - Using npm
1415 `$ npm install css-only-tooltip`
1516
16- - Using yarn
17+ - Using yarn
1718 `$ yarn add css-only-tooltip`
1819
1920- Using jsDelivr CDN
@@ -47,7 +48,15 @@ And then pass the tooltip text in format:
4748</body >
4849</html >
4950 ```
50-
51+ #### When using Package Manger (NPM/Yarn):-
52+ Import the styleSheet into the main root level component of the App. (for eg. in ` App.js ` in React App)
53+ ``` js
54+ import ' css-only-tooltip/dist/styles.min.css' ;
55+ ```
56+ Now, add the text in the ` data ` attribute in the child components.
57+ ``` jsx
58+ < data- css- only- tooltip= " Hello from tooltip" > Hover on me to see the tooltip< / span>
59+ ```
5160## Customization
5261There are customization options provided.
5362Provide the customization options in a space seperated string in the data attribute like this:-
@@ -64,10 +73,12 @@ Thre are some optional customization options are available.
6473 - `bottom`
6574 - `left`
6675
67- - #### Themes:
68- There are two theme options provided. `light` is default option.
76+ - #### Themes:
77+ This supports the user device's theme dynamically. There's no need to specify theme spereately.
78+ Beside this, there are two theme options provided for customization. `light` is default option.
6979 - `dark`
7080 - `light`
81+
7182---
7283| Option| Values | default | Required |
7384| --| --| --| --|
0 commit comments