Back to the list

Burger

Button mainly used for navigation on mobile. Try to always add an aria-label for better accessibility.

File to include

@import "components/burger";

Script to include

<script src="/lib/burger.js"></script>
<button class="burger" data-color="primary" aria-label="Open / Close burger"></button>
<button class="burger" data-color="secondary" aria-label="Open / Close burger"></button>
<button class="burger" data-color="success" aria-label="Open / Close burger"></button>
<button class="burger" data-color="danger" aria-label="Open / Close burger"></button>
<button class="burger" data-color="warning" aria-label="Open / Close burger"></button>
<button class="burger" data-color="black" aria-label="Open / Close burger"></button>
<button class="burger" data-color="white" aria-label="Open / Close burger"></button>

Attributes

Name Example value Possible values Default Required
data-color warning "primary" | "secondary" | "success" | "danger" | "warning" | "gray" | "black" | "white" primary No