Skip to content

Cookie consent

A consent notice with equal-weight Accept and Reject, and per-purpose switches, honest by default, dismissible.

Consent

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/cookie-consent.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-consentThe notice (a region). Add mn-consent-fixed to pin it to the bottom of the viewport.
mn-consent-actionsReject and Accept with equal weight, then Customise.
mn-consent-optionsA <details> with one switch per purpose; necessary is on and disabled.

Accessibility

  • It is a labelled region (role="region" with aria-label), not a modal: the page stays usable.
  • Reject and Accept have the same size and weight; nothing is pre-ticked except strictly necessary storage.
  • Buttons with data-mn-dismiss close it; store the choice and do not show it again.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page