Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

WebComponent for creating a customisable boolean input element.

License

Notifications You must be signed in to change notification settings

anshu-krishna/Input-Boolean-WebComponent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Input Boolean

WebComponent for creating customisable boolean input elements.

Preview:

preview1

preview2

Attribute:

true : If present value is set to true (i.e. the right value is choosen)

Named slots:

The left option: false-opt
The right option: true-opt

Events:

Emits change event when the value is changed.

Custom CSS

--svg-color : SVG fill color (eg. #000)
--button-radius : Button border radius (eg. 1em)
--button-border : Button border value (eg. 1px solid)
--button-gap : Gap between left option, button and right option (eg. 0.5em)
--button-color : Color of the button (eg. #000)
--button-background : Background color of the button (eg. rgba(0, 0, 0, 0.1))

Usage:

<input-boolean></input-boolean>

Results in: preview3

<input-boolean true></input-boolean>

Results in: preview3

<input-boolean>
	<span slot="false-opt">False</span>
	<span slot="true-opt">True</span>
</input-boolean>

Results in: preview3

About

WebComponent for creating a customisable boolean input element.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published