NexoreUI
InstallationComponentsNexore MakeGitHub
GitHub
NexoreUIv0.1.2

Getting Started

Installation

Components

ButtonInputCardBadgeAlertAvatarAccordionModal / DialogTooltipTabsProgressSkeletonSliderSwitchRatingCommandTableStepperScroll AreaFile UploadNavigationIconsDock

Pro

ChartsData DisplayDark Mode ToolkitCommerceCookie ConsentSocialPremium EffectsLoaders

Animated

MarqueeNumber TickerAnimated NumberTyping AnimationBlur FadeBox RevealFile Preview CardImage Compare
MIT License
DocsSwitch

Switch

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

Next ComponentDock

Switch

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

When to use

toggle switchImmediate state changes (dark mode toggle, push notifications, wifi settings)
checkbox (alternative)Standard multi-select forms where actions are not applied instantly (requires a Submit button click)

Interactive Playground

Switch Playground
nexoreui
Live Preview
Props Panel
boolean

The controlled state of the switch

boolean

Whether the switch is interactive or not

Generated Code
Open in GitHub
import { Switch } from "nexoreui"

<Switch />

Default Switch

component.tsx

Disabled Switch

component.tsx

With Label & Description

component.tsx

Settings Row Card

Receive real-time alerts in this browser.

component.tsx

Animated Toggle Switch (Hero)

component.tsx

API Reference (Props)

PropTypeDefaultDescription
checkedbooleanfalseControlled checked state of the switch toggle.
defaultCheckedbooleanfalseDefault initial checked state.
onCheckedChange(checked: boolean) => void—Callback triggered when the checked state changes.
disabledbooleanfalseDisables interaction and visually mutes the switch.
namestring—Name of the input field for HTML forms integration.
valuestring—Value of the switch input element.
classNamestring—Additional custom class names.

♿ Accessibility (a11y)

  • Keyboard Navigation: Fully focusable using Tab, and state changes on Space or Enter.
  • ARIA attributes: Uses Radix UI Switch primitive, which exports role="switch" and maps the state visually to screen readers via aria-checked.