thekavikumar / love-simple-ui

An open-source, light-weighted, tailwindcss supported UI library for developers to make their life easier :)
https://love-simple-ui.vercel.app
MIT License
55 stars 100 forks source link

[Feat]: Toggle Component with Props and Icon Support #179

Closed balaji-sivasakthi closed 9 months ago

balaji-sivasakthi commented 10 months ago

Description:

I would like to request the addition of a toggle component to this library. The main objective of this component is to provide a lightweight and customizable toggle functionality for React applications. The proposed toggle component should have the following features:

Toggle Functionality:

The component should provide a simple and intuitive toggle behavior, allowing users to switch between two states (e.g., on/off or true/false).

Props Handling:

The toggle component should support props to enable customization and flexibility. The following props should be included:

Icon Support:

The toggle component should allow the inclusion of icons associated with each state. Icons can be used to visually represent the toggle states, such as using a checkmark for "on" and a cross for "off." The component should accept props for specifying the icons to be used or provide default icons if no custom icons are provided.

Mockup:

balajisivasakthi-toggle-design

Addtional context:

balaji-sivasakthi commented 10 months ago

@thekavikumar ?

thekavikumar commented 10 months ago

Make sure you provide comments in the code!

thekavikumar commented 10 months ago

You also have to update in the website I mean the docs

balaji-sivasakthi commented 10 months ago

Ok, I will do it.