Docs
Search the documentation
⌘K
FR
0.2.0-preview.67
Playground
GitHub
COMMENCER ICI
Premiers pas
ARCHITECTURE
Vue d'ensemble de l'architecture
Composants write-once
Surface déclarative
Architecture des paquets
Composants
Styles
Localisation
Analytics et GTM
WRITE-ONCE
Moteur Photon
Design System
Capacités
Stockage
Formulaires
Éditeur de code
Vue de tableau
Markdown
Mermaid
Rendu des e-mails
COMPILATION
Compilateur
Fonctionnalités C# prises en charge
Résolution des types externes
Flux de build
Diagnostics
RUNTIME
Runtime (TypeScript)
Performance
SERVEUR
Intégration serveur
Événements serveur
Uploads
Assets
BunPackage
Sécurité
ÉCOSYSTÈME
Image
Graphiques
Icônes
Lottie
DÉVELOPPEMENT
Éditeur visuel
Débogage
Roadmap
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