DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.7K
Sign inGet All-Access
  1. Components
  2. Switch
  3. Switch Basic
MarkdownShare

Shadcn Switch Basic

Basic switch. Built by composing Field, Switch. A free, open source shadcn switch example you can install with npx shadcn@latest add @reui/c-switch-1 and edit as your own code.

Basic switch.

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.

Best for: The minimal row: one switch, off on load, left of its Airplane Mode label in a horizontal Field

When to use

  • Single on or off preferences beside a label, such as airplane mode, sign in security or an AI feature
  • Grouped notification, privacy and editor preferences in a card, a Frame panel or a dense list
  • Options with a supporting sentence set as clickable tiles, including a risky one that erases data

When not to use

  • Several related options stacked under one shared heading: use the Switch Group example
  • A complete options page with account, security and notification sections ready to drop in: use the Settings blocks
  • A row of pressed buttons that picks a view, an alignment or a time range: use the Toggle Group component
  • A consent or terms box that is ticked and sent along with a form: use the Checkbox component

Agent notes

  • Every Switch here is uncontrolled, seeded by defaultChecked or left off, and nothing reads a flip back; control it to save the setting
  • No example gives Switch a name, so a native form submit carries none of these values; add one when the switch sits inside a form
Markdownhttps://reui.io/components/switch/c-switch-1.md
MCPget_example("c-switch-1")
Installnpx shadcn@latest add @reui/c-switch-1
Full index for agents:llms.txtReUI MCP setup

Shadcn Components in Switch Basic

  • Field
  • Switch

About Shadcn Switch Basic

Basic switch. Built by composing Field, Switch. A free, open source shadcn switch example you can install with npx shadcn@latest add @reui/c-switch-1 and edit as your own code.

What You Can Build With Shadcn Switch Basic

  • Composes Field, Switch, so it drops into any project already using those components.
  • Install it with the shadcn CLI: npx shadcn@latest add @reui/c-switch-1
  • Open source and free, with the full source on this page to copy or adapt.

More Shadcn Switch Examples

  • With Description Switch with description.
  • Disabled Disabled switch.
  • Sizes Switch in different sizes.
  • Switch Group Switch group
  • Card Separators Switch list in card with separators
  • Card With Icons Switch list in card with icons
  • In Frame Switch in frame
  • Tooltip Info Switch with tooltip info
  • With Badges Switch with badges
  • Colored Colored switches
  • Destructive Confirm Destructive switch with confirmation text
  • Compact Table Compact settings table with switches

Related Shadcn Component Categories

  • Table

    Open-source shadcn table components for admin tables, data display, and responsive lists.

  • Tabs

    Open-source shadcn tabs components for segmented content, settings views, and dashboard sections.

  • Textarea

    Open-source shadcn textarea components for comments, long-form input, and support tickets.

  • Time Picker

    Open-source shadcn time picker components for booking forms, opening hours, and shift scheduling.

  • Timeline

    Open-source shadcn timeline components for activity feeds, roadmaps, and event history.

  • Toggle

    Open-source shadcn toggle components for formatting controls, compact actions, and binary UI states.

Frequently Asked Questions

When should I use Shadcn Switch Basic?

Use it for the minimal row: one switch, off on load, left of its Airplane Mode label in a horizontal Field.

Shadcn Switch as a whole fits:

  • Single on or off preferences beside a label, such as airplane mode, sign in security or an AI feature
  • Grouped notification, privacy and editor preferences in a card, a Frame panel or a dense list
  • Options with a supporting sentence set as clickable tiles, including a risky one that erases data

For several related options stacked under one shared heading, use the Switch Group example. For a complete options page with account, security and notification sections ready to drop in, use the Settings blocks. For a row of pressed buttons that picks a view, an alignment or a time range, use the Toggle Group component. For a consent or terms box that is ticked and sent along with a form, use the Checkbox component.

How do I install Shadcn Switch Basic?

Run npx shadcn@latest add @reui/c-switch-1. The CLI copies the source into your project, so you own the code and can edit it freely.

Is Shadcn Switch Basic free to use?

Yes. Every ReUI component example is open source and free for personal and commercial projects.

Which components does Shadcn Switch Basic use?

It composes Field, Switch. The shadcn CLI installs those alongside the example.
NextWith Description

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App ShellAdded 4 new App Shell blocks
  • Auth
  • Card
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • Base
  • AdvancedNew Advanced category with 3 Data Grid blocks
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area Chart
  • Bar Chart
  • Composed Chart
  • Line Chart
  • Pie Chart
  • Radial Chart
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.7K