Hamburger Menu

0 viewsmedium
Background:
Hamburger Menu
1
2
3
4
5
6
7
8
9
10
11
<div class="hamburger-container3">
  <input type="checkbox" id="toggleChecker3" />
  <label for="toggleChecker3" id="togglerLabel3">
    <div class="checkboxtoggler3">
      <div class="line-13"></div>
      <div class="line-23"></div>
      <div class="line-33"></div>
    </div>
    <span class="hamburger-label3">Menu Toggle</span>
  </label>
</div>
Was this helpful?

What is inside Hamburger Menu

Hamburger Menu is a CSS checkbox built with transforms, defined in 60 lines across 11 selectors.

19
CSS properties
11
Selectors
60
Lines of CSS
3
Formats

Techniques used

TransitionsTransformsChecked stateFlexbox

CSS properties in this component

-ms-transform-webkit-transformalign-itemsbackgroundborder-radiuscolorcursordisplayflex-directionfont-familyfont-sizefont-weightgapheighttransformtransform-origintransitiontransition-durationwidth

Accessibility check1 to fix

  • Built on a native <input> element, so keyboard focus and screen reader semantics work without extra attributes.
  • No focus style is defined. Add one before shipping, or keyboard users lose track of position.

These notes are generated by reading this component's own source, so they describe what it actually does rather than what a template says. Copy the code above in HTML, CSS, Tailwind and adapt it freely.