1.1.1 • Published 3 years ago

@jsdesign/jsd-select v1.1.1

Weekly downloads
16
License
MIT
Repository
-
Last release
3 years ago

<jsd-select>

Simple select dropdown web-component to be use accross web irrespective of frameworks.

Installation

npm install @jsdesign/jsd-select

Attributes

NameTypeDefaultDescription
idstring''Sets the id attribute for the select. Preferred when used inside forms.
namestring''Sets the name attribute for the select. Preferred when used inside forms.
labelstring''Label to display for the select.
placeholderstring'Select an option'Sets the select placeholder.
disabledstring--When attribute is present, select is disabled cannot be interacted with.
autofocusstring--When attribute is present, autofocus the select element.
listArray[]Creates the radio list based on this attribute. Should be a array of value string of object with value and label.
valuestring''Sets the default checked value of the radio.
themestring'lightWhen 'dark', the input will adapt to dark theme.
full-widthstring--When attribute is present, the radio chip will take full width of the container.
error-msgstring''When error message string is provided, the input will be error themed and error message is displayed.
help-msgstring''When help message string is provided, help message is displayed.
filter-on-typeboolean--When attribute is present, enables filter in to filter select list

Examples

Default Radio chip

npm.io npm.io

<jsd-select id='state' value='West Bengal' list='["West Bengal", "Karnataka", "Uttar Pradesh", "Kerala", "Tamil Nadu", "Madhya Pradesh"]'>
</jsd-select>

Radio chip with error

npm.io

<jsd-select id='state' error-msg='Select an option please' list='["West Bengal", "Karnataka", "Uttar Pradesh", "Kerala", "Tamil Nadu", "Madhya Pradesh"]'>
</jsd-select>

Disabled Radio chip

npm.io

<jsd-select id='state'disabled list='["West Bengal", "Karnataka", "Uttar Pradesh", "Kerala", "Tamil Nadu", "Madhya Pradesh"]'>
</jsd-select>

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.1

3 years ago

1.1.0

3 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

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago