Controls

A toggle component that allows users to enable or disable a setting with a smooth transition effect.

Basic

A switch is a toggle that flips between on and off, similar to a light switch.

Installation

If you hit any issues, make sure you check out the installation guide here for more information.

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

The Switch comes packed with several components to enhance functionality and provide a seamless experience.

FieldField's a core piece every other component uses. It flexes reusable styles, showing up in inputs, labels, descriptions, and more.

Manual installation

Make sure you also install the composed components and the required packages for the component to function properly.

Anatomy

Description

You can add a description to the switch by passing the description prop or using the Description component.

Privacy settings
Choose what others can see and how your account is shown.

Controlled

You can manage the switch's state by setting the isSelected prop.

Uncontrolled

You can also use the uncontrolled version of the switch.

Disabled

A disabled switch cannot be toggled and is non-interactive.

Ready-to-use templates
Launch faster with complete, professional templates for modern web apps.
irsyad.co