diff --git a/snippets/custom-radio.md b/snippets/custom-radio.md new file mode 100644 index 000000000..b1385f2cf --- /dev/null +++ b/snippets/custom-radio.md @@ -0,0 +1,83 @@ +--- +title: Custom radio button +tags: visual,animation +expertise: advanced +author: chalarangelo +cover: blog_images/messy-computer.jpg +firstSeen: 2022-11-16T05:00:00-04:00 +--- + +Creates a styled radio button with animation on state change. + +- Create a `.radio-container` and use flexbox to create the appropriate layout for the radio buttons. +- Reset the styles on the `` and use it to create the outline and background of the radio button. +- Use the `:before` element to create the inner circle of the radio button. +- Use `transform: scale(1)` and a CSS transition to create an animation effect on state change. + +```html +