Switch
Two-state button that can be switched on or off. Requires an alias import.
Source Tailwind CSS
Receive emails about new products, features, and more.
Installation
templui add switchSince switch is a reserved Go keyword, use an alias import:
import switchcomp "your-project/components/switch"Examples
Form
Manage your devices connectivity options.
Please configure your connectivity settings.
API Reference
Required parameter
Hover for description
Switch
Two-state button component that can be switched on or off.
| Name | Type | Default |
|---|---|---|
Unique identifier for the switch element. | | - |
Additional CSS classes to apply to the switch. | | - |
Additional HTML attributes to apply to the switch element. | | - |
Name attribute for form submission. | | - |
Value sent when the switch is checked. | | |
Whether the switch is initially checked. | | |
Whether the switch is disabled and non-interactive. | | |