1.1.0 • Published 4 years ago

@zestui/checkbox v1.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

<zest-checkbox>

Simple checkbox input web-component to be use accross web irrespective of frameworks.

Installation

npm install @zestui/checkbox

Attributes

NameTypeDefaultDescription
idstring''Sets the id attribute for the checkbox input. Preferred when used inside forms.
namestring''Sets the name attribute for the input. Preferred when used inside forms.
labelstring''Label to display for the checkbox input.
disabledstring'false'When 'true' checkbox input is disabled cannot be interacted with.
requiredstring'false'When 'true' the input field is marked mandatory.
listArray[]Creates the checkbox list based on this attribute. Should be a array of value string.
valueArray[]Sets the default checked values. Must be list of valid values.
themestring'lightWhen 'dark', the input will adapt to dark theme.
inlinestring'false'When 'true', the checkbox inputs will be aligned inline.
error-msgstring''When error message string is provided, the checkbox input will be error themed and error message is displayed.

Examples

Default Radio

npm.io

<zest-checkbox id='snacks' label='snacks' value='["Samosa"]' list='["Samosa", "Kachori", "Jalebi"]' onchange="test(event)"></zest-checkbox>

Inline Radio

npm.io

<zest-checkbox id='snacks' inline='true' label='snacks' value='["Samosa"]' list='["Samosa", "Kachori", "Jalebi"]'></zest-checkbox>

Radio with error

npm.io

<zest-checkbox id='snacks-disabled' label='snacks' error-msg='Please select your choices' list='["Samosa", "Kachori", "Jalebi"]'>
</zest-checkbox>

Disabled Radio

npm.io

<zest-checkbox id='snacks-disabled' disabled='true' label='snacks' value='["Samosa"]' list='["Samosa", "Kachori", "Jalebi"]'>
</zest-checkbox>

Cutomizable property list

NameDefault
--color-primary#1eba68;
--color-primary-dark#1ba75e;
--color-secondary#f6f6f6;
--color-secondary-dark#efefef;
--color-secondary-darkthemergba(255, 255, 255, 0.3);
--color-secondary-dark-darkthemergba(255, 255, 255, 0.6);
--color-error#dd4421;
--color-error-background#ffebe6;
--color-placeholder#737373;
--color-placeholder-disabled#e0e0e0;
--color-placeholder-darktheme#e0e0e0;
--color-label#909090;
--color-black#2c2c2c;
--color-header-black#252525;
--color-header-tag#747373;
--color-white#ffffff;
--color-border#edebeb;
--border-radius0.5rem;
--border-width1px;
--border-width-hover3px;
--label-spacing0.2rem;
--label-caseuppercase;
--label-font-size0.8rem;
--button-font-weight500;
1.1.0

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago