# ak-blanket

> A React component that covers the underlying UI for a layered component.

Latest version **6.0.3** (published 2017-01-24) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ak-blanket
pnpm add ak-blanket
yarn add ak-blanket
bun add ak-blanket
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 6.0.3 |
| Published | 2017-01-24 |
| First published | 2016-08-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian Pty Ltd |
| Maintainers | atlassian-aui |
| Keywords | atlaskit, ui |

## Links

- npm: https://www.npmjs.com/package/ak-blanket
- Repository: https://bitbucket.org/atlassian/atlaskit
- Homepage: https://bitbucket.org/atlassian/atlaskit#readme
- npm.io page: https://npm.io/package/ak-blanket

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.11.6
- [akutil-shared-styles](https://npm.io/package/akutil-shared-styles.md) ^37.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 6.0.3 (latest) — 2017-01-24
- 6.0.2 — 2017-01-03
- 6.0.1 — 2016-12-01
- 6.0.0 — 2016-12-01
- 4.0.2 — 2016-11-09
- 4.0.1 — 2016-11-08
- 4.0.0 — 2016-11-07
- 3.1.1 — 2016-11-03
- 3.1.0 — 2016-10-19
- 3.0.9 — 2016-10-17
- 3.0.8 — 2016-10-10
- 3.0.7 — 2016-09-29
- 3.0.5 — 2016-09-27
- 3.0.4 — 2016-09-23
- 3.0.3 — 2016-09-21
- … 9 more at https://npm.io/package/ak-blanket/versions

## README

[![AtlasKit component registry](https://img.shields.io/badge/AtlasKit-components-FF5230.svg)](http://aui-cdn.atlassian.com/atlaskit/registry/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://Commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/GitHub-semantic_release-ffab00.svg)](https://github.com/semantic-release/semantic-release)
[![Report an issue](https://img.shields.io/badge/Report-an_issue-6554C0.svg)](https://ecosystem.atlassian.net/browse/AK)
[![Ask in our forum](https://img.shields.io/badge/Ask-in_our_forum-6554C0.svg)](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-blanket,ak-blanket@6.0.3)

# Blanket

The main purpose of the blanket component is to provide the overlay layer for components such as a modal dialog or a tooltip.

![Example blanket](https://bytebucket.org/atlassian/atlaskit/raw/22af8c2e73d35f09b6c60c37805d885cf6057d9b/packages/ak-blanket/docs/blanket.gif)

## Try it out

Interact with a [live demo of the ak-blanket component](https://aui-cdn.atlassian.com/atlaskit/stories/ak-blanket/6.0.3/).

## Installation

```sh
npm install ak-blanket
```

## Using the component

Import the component in your React app as follows:

```js
import Blanket from 'ak-blanket';
ReactDOM.render(<Blanket />, container);
```

There is an `onBlanketClicked` function prop, which is useful for hiding the blanket when the user clicks it.

No custom z-index style is applied, so make sure you put it into an appropriate DOM position.

For the purpose of simplicity blanket doesn't have any `show/hide` functionality. Since the main use of it suppose to be inside `popup` elements it would appear/disappear with the parent element.

<a name="Blanket"></a>

## Blanket
**Kind**: global class  
* Properties

    *  [blanket.isTinted](#Blanket+isTinted) : <code>Boolean</code>
    *  [blanket.onBlanketClicked](#Blanket+onBlanketClicked) : <code>function</code>

<a name="new_Blanket_new"></a>

### new Blanket()
A blanket which is placed over other page content

**JS Example**
```js
import Blanket from 'ak-blanket';
ReactDOM.render(<Blanket />, container);
```
<a name="Blanket+isTinted"></a>

### blanket.isTinted : <code>Boolean</code>
Whether the blanket has a tinted background color

**Kind**: instance property of <code>[Blanket](#Blanket)</code>  
**Default**: <code>false</code>  
<a name="Blanket+onBlanketClicked"></a>

### blanket.onBlanketClicked : <code>function</code>
Handler function to be called when the blanket is clicked

**Kind**: instance property of <code>[Blanket](#Blanket)</code>  

## Support and feedback

### We're here to help!

Let us know what you think of our components and docs, your feedback is really important for us.

### Community support

Ask a question in our [forum](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-blanket,ak-blanket@6.0.3).

Check [if someone has already asked the same question before](https://answers.atlassian.com/questions/topics/42926171/atlaskit).


### Create a support ticket

Are you in trouble? [Let us know](https://ecosystem.atlassian.net/browse/AK)!

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