Go to homepage

Projects /

Radio Switch

Custom radio toggle.

View Demo

How to

The Radio Switch component is a control used to switch between 2 different options.

To create the custom radio elements in CSS, we hide the native input and stylize their <label>.

The component includes the following CSS custom properties:

:root {
  // style
  --radio-switch-width: 186px;
  --radio-switch-height: 46px;
  --radio-switch-padding: 3px;
  --radio-switch-radius: 50em;

  // animation
  --radio-switch-animation-duration: 0.3s;
}

Categories

Bug report & feedback

Component Github page ↗

Project duplicated

Project created

Globals imported

There was an error while trying to export your project. Please try again or contact us.