logo polydile dile-components

dile-chip-tooltip

Web component to display a configurable chip that opens a tooltip.

Installation

npm install @dile/dile-tooltip

Usage

Import the component.

import '@dile/dile-tooltip/dile-chip-tooltip';

Use the component.

<dile-chip-tooltip message="I am a message" label="Tooltip"></dile-chip-tooltip>

Properties

Styling

Use the dile-tooltip styles and some additional styles. Not documented yet...

dile-tooltip demos

Default tooltips

<dile-chip-tooltip message="I am a message" label="Tooltip"></dile-chip-tooltip>

Only icon

<style>
  .onlyicon {
      --dile-chip-tooltip-padding: 0.25rem;
    }
</style>
<dile-chip-tooltip message="Hi my friend!!" class="onlyicon" position="right"></dile-chip-tooltip>

Styled chip tooltip

<style>
  .styled {
      --dile-chip-tooltip-background-color: #7d187b; 
      --dile-chip-tooltip-text-color: #ffc;
      --dile-chip-tooltip-icon-color:  rgb(239, 161, 238) 
    }
</style>
<dile-chip-tooltip class="styled" label="Styled!" message="I am an styled tooltip"></dile-chip-tooltip>