# @flexilla/dismissible

> A lightweight JavaScript component that automatically makes a component dismissible for easy user interaction.

Latest version **2.0.18** (published 2026-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @flexilla/dismissible
pnpm add @flexilla/dismissible
yarn add @flexilla/dismissible
bun add @flexilla/dismissible
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.18 |
| Published | 2026-09-30 |
| First published | 2024-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | johnkat-mj |
| Maintainers | johnkat-mj |
| Keywords | dismissible, remove-element, js, ts, component, interactive, intercative component, flexilla |

## Links

- npm: https://www.npmjs.com/package/@flexilla/dismissible
- Repository: https://github.com/unoforge/flexilla
- Homepage: https://github.com/unoforge/flexilla#readme
- Issues: https://github.com/unoforge/flexilla/issues
- npm.io page: https://npm.io/package/@flexilla/dismissible

## Dependencies (2)

- [@flexilla/manager](https://npm.io/package/@flexilla/manager.md) 0.2.5
- [@flexilla/utilities](https://npm.io/package/@flexilla/utilities.md) 2.5.6

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.18 (latest) — 2026-09-30
- 2.0.17 — 2026-07-10
- 2.0.16 — 2026-04-15
- 2.0.15 — 2026-02-23
- 2.0.14 — 2025-08-21
- 2.0.13 — 2025-08-14
- 2.0.12 — 2025-08-13
- 2.0.11 — 2025-04-19
- 2.0.10 — 2025-03-26
- 2.0.9 — 2025-03-22
- 2.0.8 — 2025-03-20
- 2.0.7 — 2025-03-16
- 2.0.6 — 2025-02-23
- 2.0.5 — 2025-02-03
- 2.0.3 — 2024-09-28
- … 7 more at https://npm.io/package/@flexilla/dismissible/versions

## README

# @flexilla/dismissible | Dismissible Component

`@flexilla/dismissible` is a lightweight package that provides a way to dismiss elements from the DOM or hide them from the screen.

## Installation

```shell
npm install @flexilla/dismissible
```
Import 
```js
import Dismissible from '@flexilla/dismissible';
```

## Params

| Name | Description | Data Attributes | Type | | --------------------- | -------------------------------------- | --------------- | -------------------- | | dismissibleElement | The element to be dismissed. | - | HTMLElement | | action | The action to perform when dismissing the element. Available options: "remove-from-dom", "hide-from-screen". | data-action | "remove-from-dom" \| "hide-from-screen" | | onDismiss | The callback function to be executed when the element is dismissed. | - | () => void |

## Example
```html
<div class="dismissable-element" data-action="remove-from-dom">
    <button class="dismiss-button" data-dismiss-btn>Dismiss</button>
</div>

<script>
    const dismissible = new Dismissible('.dismissable-element',
        action: "remove-from-dom",
        onDismiss: () => {
            console.log("Element dismissed!");
        });

        // or 
        fDismissible('.dismissable-element',
        action: "remove-from-dom",
        onDismiss: () => {
            console.log("Element dismissed!");
        })
</script>
```

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