logo polydile dile-components

dile-chip-tooltip

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

Installation

npm install @dile/ui

Usage

Import the component.

import '@dile/ui/components/tooltip/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-primary-color: #7d187b; 
      --dile-on-primary-color:  rgb(239, 161, 238);
      --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>