6.1.9 • Published 2 years ago

bpk-component-tooltip-css v6.1.9

Weekly downloads
177
License
Apache-2.0
Repository
github
Last release
2 years ago

bpk-component-tooltip

Backpack tooltip component.

Installation

npm install bpk-component-tooltip --save-dev

Usage

import React, { Component } from 'react';
import BpkText from 'bpk-component-text';
import BpkTooltip from 'bpk-component-tooltip';

const App = () => (
  <BpkTooltip
    ariaLabel="London Heathrow"
    id="my-tooltip"
    target={<BpkText textStyle="lg">LHR</BpkText>}
  >
    London Heathrow
  </BpkTooltip>
);

Props

PropertyPropTypeRequiredDefault Value
ariaLabelstringtrue-
idstringtrue-
childrennodetrue-
targetnodetrue-
hideOnTouchDevicesboolfalsetrue
placementoneOf('top', 'right', 'bottom', 'left')false'bottom'
paddedboolfalsetrue
portalStyleobjectfalsenull
portalClassNamestringfalsenull
popperModifiersobjectfalsenull
renderTargetfuncfalsenull
typeoneOf(TOOLTIP_TYPES.light, TOOLTIP_TYPES.dark)falseTOOLTIP_TYPES.light

Prop Details

ariaLabel

Tooltips are invisible to assistive technologies such as screen readers. To improve accessibility, ariaLabel is required to describe the content of the tooltip to assistive technologies.

The label will be used on the target element, so any existing aria-label attached to target will be overridden.

popperModifiers

Please refer to the documentation for the underlying positioning library "Popper.js". You can achieve various behaviours such as allowing the tooltip to overflow the viewport etc.

6.1.9

2 years ago

6.1.5

2 years ago

6.1.7

2 years ago

6.1.2

2 years ago

6.1.4

2 years ago

6.1.1

2 years ago

6.0.30

2 years ago

6.0.33

2 years ago

6.0.27

2 years ago

6.0.28

2 years ago

6.0.22

2 years ago

6.0.20

2 years ago

6.0.19

2 years ago

6.0.18

2 years ago

6.0.14

3 years ago

6.0.11

3 years ago

6.0.9

3 years ago

6.0.7

3 years ago

6.0.8

3 years ago

6.0.6

3 years ago

6.0.5

3 years ago

6.0.4

3 years ago

6.0.3

3 years ago

6.0.2

3 years ago

6.0.1

3 years ago

5.1.5

3 years ago

6.0.0

3 years ago

5.1.7

3 years ago

5.1.4

3 years ago

5.1.3

3 years ago

5.1.2

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.9

3 years ago

5.0.10

3 years ago

5.0.8

3 years ago

5.0.7

3 years ago

5.0.6

3 years ago

5.0.5

3 years ago

5.0.4

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.1.63

3 years ago

4.1.64

3 years ago

4.1.65

3 years ago

4.1.62

3 years ago

4.1.61

3 years ago

4.1.60

3 years ago

4.1.59

3 years ago

4.1.58

3 years ago

4.1.57

3 years ago

4.1.56

3 years ago

4.1.55

3 years ago

4.1.54

3 years ago

4.1.53

3 years ago

4.1.52

3 years ago

4.1.50

3 years ago

4.1.51

3 years ago

4.1.47

3 years ago

4.1.46

3 years ago

4.1.45

4 years ago

4.1.44

4 years ago

4.1.43

4 years ago

4.1.41

4 years ago

4.1.40

4 years ago

4.1.38

4 years ago

4.1.39

4 years ago

4.1.37

4 years ago

4.1.36

4 years ago

4.1.34

4 years ago

4.1.33

4 years ago

4.1.32

4 years ago

4.1.27

4 years ago

4.1.26

4 years ago

4.1.25

4 years ago

4.1.23

4 years ago

4.1.22

4 years ago

4.1.21

4 years ago

4.1.20

4 years ago