0.4.0 • Published 1 year ago

@dpa-id-components/ui-tooltip v0.4.0

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

@dpa-id-components/ui-tooltip

UiTooltip Vue 2.x tooltip component based on the dpa Design Kit

Installation

yarn add @dpa-id-components/ui-tooltip

Usage

<!-- SomeComponent.vue using UiTooltip -->
<template>
  <div style="margin: 50px; max-width: max-content;">
    <ui-tooltip>
      <template v-slot:activator>
        <button>Target</button>
      </template>
      Tooltip Content
    </ui-tooltip>
  </div>
</template>

<script>
  import UiTooltip from "@dpa-id-components/ui-tooltip";

  export default {
    components: { UiTooltip },
  };
</script>

Demo

View a demo of <ui-tooltip> on Storybook

API

Props

NameTypeDefaultValuesDescription
positionString"bottom-center""top-left" | "top-center" |"top-right"|"right"|"bottom-right"|"bottom-center"|"bottom-left"|"left"Position of the tooltip relative to the activator slot
structured-infoArray[]e.g. [{ title: "Typ", description: "Termine" }]For tootltips with structured information, i.e. title and description
structured-LayoutBooleanfalseNeeds to be enabled for the structured tooltip

Slots

NameDescription
defaultDfault slot for text/content of the tooltip
activatorSlot for tooltip activator
0.4.0

1 year ago

0.3.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.0

2 years ago

0.1.1

3 years ago

0.1.0

3 years ago