Switch
EXAMPLES 2
switch(name='notifications', label='Enable notifications', checked=True)
switch(name='dark_mode', label='Dark mode', checked=False)
USAGE
from djust_components.components.switch import Switch
component = Switch(name='',
checked=False,
label=None,
disabled=False,
action=None,
custom_class='',
kwargs)
html = component.render()
PARAMETERS 7
| Name | Type | Default |
|---|---|---|
name |
<class 'str'> |
'' |
checked |
<class 'bool'> |
False |
label |
typing.Optional[str] |
None |
disabled |
<class 'bool'> |
False |
action |
typing.Optional[str] |
None |
custom_class |
<class 'str'> |
'' |
kwargs |
— |
— |