nb-checkbox()
size
— mtype
— checkbox
'size'
{string}'s'
/'m'
'id'
{string}...'name'
{string}...'class'
{array}['my_class1', 'my_class2']
— additional classes'type'
{string}'checkbox'
/'radio'
/'button'
'disabled'
{boolean} — disabled button'value'
{string} — value'tabindex'
{string} — tabindex'checked'
{boolean} — checked button'theme'
{string}'normal' / 'action' (yellow) / 'dark' / 'pseudo' / 'promo' (big yellow)
— theme for button type'content'
{string} — text (or custom html) of the label, can be string orxml
xss warning!'attrs'
{object}{'attr2': 'value2'}
— custom DOM attributes for checkbox input
nb-checkbox({ 'checked': true() })
nb-checkbox({ 'content': 'Do you want to be an icon for the disfranchised masses?' 'name': 'is_rock_star' })
nb-checkbox({ 'size': 'm' }) ' ' nb-checkbox({ 'size': 's' })
Button type of checkbox
nb-checkbox({ 'type': 'button' 'content': 'Greet the world?' })
nb-checkbox({ 'content': 'Bet you can`t check me!' 'disabled': true() })
nb-checkbox({ 'type': 'button' 'content': 'I`m sorry, but you can`t do it anymore' 'disabled': true() })
Radio buttons
nb-checkbox({ 'name': 'radio1' 'type': 'radio' 'content': 'Variant #1' }) nb-checkbox({ 'name': 'radio1' 'type': 'radio' 'content': 'Variant #2' }) nb-checkbox({ 'name': 'radio1' 'type': 'radio' 'content': 'Variant #3' })