DEV Community

Freecodez
Freecodez

Posted on

React Checkbox Component

Hey there, You are most welcome to this article. I hope you will enjoy this article. If you like this article then please share this article with your friends and colleagues. If you have any questions or suggestions regarding this article then please comment down below.

React Checkbox Component

React Checkbox Component

For full source code visit : https://freecodez.com/post/2epyy50

// https://freecodez.com
const Checkbox = () => {
    return (
        <div class="toggler">
            <input id="toggler-1" name="toggler-1" type="checkbox" value="1" />
            <label for="toggler-1">
                <svg class="toggler-on" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
                    <polyline class="path check" points="100.2,40.2 51.5,88.8 29.8,67.5"></polyline>
                </svg>
                <svg class="toggler-off" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
                    <line class="path line" x1="34.4" y1="34.4" x2="95.8" y2="95.8"></line>
                    <line class="path line" x1="95.8" y1="34.4" x2="34.4" y2="95.8"></line>
                </svg>
            </label>
        </div>
    );
};

Enter fullscreen mode Exit fullscreen mode

Source Code : https://freecodez.com/post/2epyy50

For more such articles visit : https://freecodez.com

Top comments (0)