# @weave-design/tooltip

> Weave Tooltip

Latest version **1.0.0** (published 2023-03-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @weave-design/tooltip
pnpm add @weave-design/tooltip
yarn add @weave-design/tooltip
bun add @weave-design/tooltip
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-03-07 |
| First published | 2023-03-07 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 420.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 193 |
| Author | Autodesk Inc. |
| Maintainers | hig-bot, wmui51 |

## Links

- npm: https://www.npmjs.com/package/@weave-design/tooltip
- Repository: https://github.com/Autodesk/hig
- Homepage: https://github.com/Autodesk/hig#readme
- Issues: https://github.com/Autodesk/hig/issues
- npm.io page: https://npm.io/package/@weave-design/tooltip

## Dependencies (4)

- [prop-types](https://npm.io/package/prop-types.md) ^15.7.1
- [@weave-design/utils](https://npm.io/package/@weave-design/utils.md) ^1.0.0
- [@weave-design/flyout](https://npm.io/package/@weave-design/flyout.md) ^1.0.0
- [@weave-design/typography](https://npm.io/package/@weave-design/typography.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2023-03-07

## README

# Tooltip

Tooltips generally describe what a tool or feature does, or when or how to use it.

## Getting started

### Install the package

```bash
yarn add @weave-design/tooltip @weave-design/theme-context @weave-design/theme-data
```

### Import the component

```js
import Tooltip from '@weave-design/tooltip';
```

## Basic usage

```jsx
<Tooltip anchorPoint="top-center" content="Testing tooltip">
  <Button title="Open Tooltip" />
</Tooltip>
```
## Styling

Use the `className` prop to pass in a css class name to the outermost container of the component. The class name will also pass down to most of the other styled elements within the component. 

Toolt also has a `stylesheet` prop that accepts a function wherein you can modify its styles. For instance

```jsx
import Tooltip from '@weave-design/tooltip';

function YourComponent() {
  // ...
  const customStylesheet = (styles, props, themeData) => ({
    ...styles,
    content: {
      ...styles.content,
      color: themeData["colorScheme.status.error"]
    },
    panel: {
      ...styles.panel,
      opacity: 1
    },
    panelInner: {
      ...styles.panelInner,
      padding: `4px`
    },
    textContent: {
      ...styles.textContent,
      position: `static`
    }
  });

  return (
    <Tooltip stylesheet={customStylesheet} />
  );
}
```

---
_Source: https://npm.io/package/@weave-design/tooltip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
