Switch

PRO

You can edit 8 Components for free. Get premium for unlimited access.

A control that allows the user to toggle between checked and not checked.

Figma

The Toggle component is used to turn things on or off.

1. Reference

This component inherits props from the Toggle.

Prop
Type
Default
state
default
active
default

2. State

You can edit the state with the default or active parameter.

Image 2.1 : State default

Image 2.2 : State active

Jetpack Compose

The Toggle component is used to turn things on or off.

1. Reference

This component inherits props from the Toggle.

Prop
Type
Default
state

-

-

2. Toggle

You can edit the state off the toggle component.

Toggle(
state = ToggleState.default
)

Preview

const DlSwitch()
Copy

Usage

Add this code example to your project to see how the component works.

const DlSwitch()
Copy

API Reference

DlSwitch is a fully tappable, animated toggle component with a rounded track and a thumb that transitions between left and right positions.

Prop
Type
Default
key
Key?
null

Discover more content

You have questions or need help?

E-Mail

You want to try?

Test for free

Save time and money?

Get Pro Version