> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brikl.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Switch 07

> A toggle switch with moon/sun icon, pill-shaped track, and animated circular knob.

<Frame>
  ![Switch 07](https://ffciaqoksnnzuihswbxs.supabase.co/storage/v1/object/public/components/Elements/Switchs/switch-with-icon-right.png)
</Frame>

## Overview

Switch 07 is a dark/light mode-style toggle switch component that allows users to switch between two states (off/on). It features a pill-shaped background that changes color, a sliding circular knob that moves left or right, and a moon/sun icon that changes based on the active state. The component uses a custom state to track whether it is active or inactive, and workflows handle the toggling logic on click.

## How to use

<Steps>
  <Step titleSize="h4" title="Open the Brikl panel">
    Navigate to the **Elements** category in the Brikl panel.
  </Step>

  <Step titleSize="h4" title="Copy the component">
    Find **Switch 07** and click **Copy**.
  </Step>

  <Step titleSize="h4" title="Paste into your editor">
    Paste it into your Bubble canvas with `Cmd + V` (Mac) or `Ctrl + V` (Windows),
    or right-click on the canvas and select **Paste**.
  </Step>
</Steps>

## States

This component includes conditional states that automatically change its appearance.

| State         | Trigger                                               | Visual effect                                                                                                          |
| ------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Off (Default) | Initial load or when custom state 'active\_' is false | Track background is light gray, knob is aligned to the left, icon shows a moon-stars symbol                            |
| On (Active)   | User clicks the switch when 'active\_' is false       | Track background changes to dark (rgba(27,23,24,1)), knob aligns to the right (flex-end), icon changes to a sun symbol |

<Note>
  These states are handled natively by Bubble and require no additional setup.
  They will work automatically once the component is pasted into your editor.
</Note>

## Responsive

This component adapts to mobile screens. Font sizes and layout automatically adjust on screens smaller than Bubble's built-in mobile breakpoint.

## Workflows

This component includes pre-built workflows.

| Trigger                                            | Action                                                                             |
| -------------------------------------------------- | ---------------------------------------------------------------------------------- |
| GP - Switch 07 is clicked (when active\_ is false) | Sets custom state 'active\_' on the group element to true, turning the switch on   |
| GP - Switch 07 is clicked (when active\_ is true)  | Sets custom state 'active\_' on the group element to false, turning the switch off |

<Note>
  These workflows are included when you use the **Copy with Workflows** option in the Brikl panel.
</Note>

## Requirements

|             |                       |
| ----------- | --------------------- |
| License     | Starter plan required |
| Plugins     | None                  |
| Custom code | Not required          |

## Platforms

| Platform | Supported |
| -------- | --------- |
| Web      | ✅         |
| Mobile   | ✅         |

## License

<Note>
  This component requires a **Starter** plan.
</Note>
