Build a responsive, animated, accessible accordion that looks pretty good

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateWeb DesignUI78 min

About this video

A walkthrough of building a responsive, animated and accessible accordion component with HTML, SVG icons, CSS and JavaScript, starting from an existing CodePen. It covers keyboard interactions, reduced-motion support, typography and containment for developers who already write front-end code.

What you’ll learn

  • Build an accordion component with HTML, SVG icons and CSS
  • Add JavaScript interactions and animations that respect prefers-reduced-motion
  • Make an accordion responsive and improve its keyboard interactions