# smootify-consent [data-action]

> Consent buttons (accept all, decline all, save choices, open preferences, close).

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/elements/smootify-consent-data-action  
Updated: 2026-10-13

## At a glance

- `data-action="accept"`: accepts every category and closes the banner.
- `data-action="decline"`: declines every category and closes the banner.
- `data-action="preferences"`: opens the preferences panel (step 2).
- `data-action="close"`: hides the banner for this page without an answer. Nothing that needs consent loads, and the banner shows again on the next page.

More in [the guide](https://www.smootify.io/docs/features/cookie-consent).

`smootify-consent [data-action]` is a **template**, read by [`smootify-consent`](https://www.smootify.io/docs/reference/elements/smootify-consent): it is never defined on its own.

## Where it can go

- **Inside** [`smootify-consent`](https://www.smootify.io/docs/reference/elements/smootify-consent).
- **Out of place,** it stays in the page and does nothing.

## What it requires

Nothing beyond Smootify: it works on every plan.

## Attributes on the element

- **It reads** `data-action`.

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [Cookie consent](https://www.smootify.io/docs/reference/attributes/consent) | `data-action` | 11 |
| [Cookie banner (condition)](https://www.smootify.io/docs/reference/conditions/consent) | `consent-condition` | 1 |
