---
title: "Toggle"
description: "A button that stays pressed. It holds a real checkbox, so it needs no JS."
group: "Forms"
order: 3
---

A button that stays pressed. It holds a real checkbox, so it needs no JS.

Styles: `components/button.css`.

## With text

```html
<div class="moin-row">
  <label class="moin-button">
    <input type="checkbox" checked>
    Pinned
  </label>
</div>
```

## Only an icon

```html
<label class="moin-button" data-icon>
  <input type="checkbox" aria-label="Notify me">
  <i class="moin-icon moin-icon-bell"></i>
</label>
```
