Docs
Search the documentation
⌘K
0.2.0-preview.30
Playground
GitHub
START HERE
Getting Started
WRITE-ONCE
Write-Once Components
Declarative Surface
Photon Engine
Design System
Capabilities
Storage
Forms
Code Editor
Markdown
Mermaid
ARCHITECTURE
Architecture Overview
Package Architecture
Components
Styling
Localization
Analytics & GTM
COMPILATION
Compiler
Compile-Time Evaluation
Supported C# Features
External Type Resolution
Build Flow
RUNTIME
Runtime (TypeScript)
Performance
SERVER
Server Integration
Assets
BunPackage
Security
ECOSYSTEM
Image
Charts
Icons
Lottie
DEVELOPMENT
Visual Editor
Debug
Roadmap
PT-BR
Analytics-pt-BR
Architecture-pt-BR
Assets-pt-BR
BuildFlow-pt-BR
BunPackage-pt-BR
Capabilities-pt-BR
Charts-pt-BR
CodeEditor-pt-BR
Compiler-pt-BR
CompileTimeEvaluation-pt-BR
Components-pt-BR
Debug-pt-BR
DeclarativeSurface-pt-BR
DesignSystem-pt-BR
ExternalTypeResolution-pt-BR
Forms-pt-BR
GettingStarted-pt-BR
Home-pt-BR
Icons-pt-BR
Image-pt-BR
Localization-pt-BR
Lottie-pt-BR
Markdown-pt-BR
Mermaid-pt-BR
PackageArchitecture-pt-BR
Performance-pt-BR
Photon-pt-BR
Roadmap-pt-BR
Runtime-pt-BR
Security-pt-BR
ServerIntegration-pt-BR
Storage-pt-BR
Styling-pt-BR
SupportedFeatures-pt-BR
VisualEditor-pt-BR
WriteOnceComponents-pt-BR
ACTIONS & INPUTS
Button
IconButton
TextInput
Select
Checkbox
Switch
RadioGroup
SegmentedControl
Slider
Stepper
SearchField
SURFACES & DISPLAY
Card
Badge
Chip
Avatar
Banner
ProgressBar
EmptyState
Divider
NAVIGATION
Tabs
AppBar
BottomNavigation
Breadcrumb
Pagination
PageIndicator
Menu
Drawer
OVERLAYS
Dialog
BottomSheet
Toast
Popover
Tooltip
LISTS & DATA
List
ListView
Table
Accordion
CodeBlock
TOUCH INTERACTION
PullToRefresh
SwipeableRow
Docs
Actions & inputs
Switch
View source
1 min read
An immediate on/off setting. Flipping it applies the change — there is no save step.
1
using
eQuantic
.
UI
.
Components
;
STATES
on
off
disabled
Usage
1
new
Switch
(
_notify
,
()
=>
SetState
(()
=>
_notify
=
!
_notify
))
API
Prop
Type
Default
Description
On
bool
false
Current state.
OnChanged
Action?
null
Fires on activation; persist inside the handler.
Disabled
bool
false
0.38, not focusable.
States
State
Rendering
Off
SurfaceSubtle
track, thumb at the start
On
Primary track, thumb at the end
Pressed
Thumb widens under the finger
Disabled
0.38
Accessibility
•
Role
switch
— announces "on" / "off", never "checked".
•
The change is announced as it applies.
When to use
•
Settings that take effect at once.
Avoid
•
Form fields awaiting submit — use a
Checkbox
.
•
Switches that open a confirmation.
NOTE
Every dimension resolves through
Sizing.*(SizeVariant)
and the token scales — never a literal. Source:
src/eQuantic.UI.Components/Switch.cs
.
PREVIOUS
Checkbox
NEXT
RadioGroup
ON THIS PAGE
Usage
API
States
Accessibility
When to use
Avoid