Docs
Buscar na documentação
⌘K
PT
0.2.0-preview.61
Playground
GitHub
COMECE AQUI
Primeiros passos
ARQUITETURA
Visão geral da arquitetura
Componentes write-once
Superfície declarativa
Arquitetura de pacotes
Componentes
Estilo
Localização
Analytics e GTM
WRITE-ONCE
Motor Photon
Design System
Capacidades
Armazenamento
Formulários
Editor de código
Markdown
Mermaid
Renderização de Email
COMPILAÇÃO
Compilador
Recursos C# suportados
Resolução de tipos externos
Fluxo de build
Diagnósticos
RUNTIME
Runtime (TypeScript)
Performance
SERVIDOR
Integração com o servidor
Eventos do servidor
Assets
BunPackage
Segurança
ECOSSISTEMA
Image
Gráficos
Ícones
Lottie
DESENVOLVIMENTO
Editor visual
Depuração
Roadmap
Atualizar de versão
Docs
Actions & inputs
Switch
Ver código-fonte
1 min de leitura
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
.
ANTERIOR
Checkbox
PRÓXIMA
RadioGroup
NESTA PÁGINA
Usage
API
States
Accessibility
When to use
Avoid