Switch components
14 free, copy-and-go React Switch examples built on the SevenUI Switch primitive. Install any of them with the shadcn CLI.
On this page
Labeled switch
A single switch with a label and a muted helper line for a marketing email opt-in.
Settings list
A bordered list of device settings, each row pairing a label and description with a switch.
Form submission
Uncontrolled house-rule switches with name, value and uncheckedValue that post yes or no, with a preview of the submitted form data.
Compact density
A dense editor View menu of small switches on full-row labels with keyboard shortcut hints.
View
Flanking icons
Controlled switches framed by off and on icons that highlight the side matching the current state.
Map layers
A token-drawn map preview whose traffic, transit, bike lane and saved place layers fade in and out with color-keyed switches.
Map layers
3 of 4 shown- Updated 2 min ago
- Metro and tram
- Protected lanes only
- 4 pins in view
Test mode
A payments panel where a warning-tinted Test mode switch swaps in test data and keys and shows a status banner.
Payments
Last 7 days · $48,210.90
- Harbor Coffee Co.Succeeded$1,240.00
- Lumen StudioSucceeded$89.00
- Oakline DentalRefunded$410.50
pk_live_51Nw…Qe8RMaster switch
A Back up photos switch that pauses its child options without losing them, with a status badge.
Read-only rules
Branch protection rules where org-enforced switches are read-only with a lock tooltip, next to one editable rule.
Branch protection
Rules for main in northwind/storefront
Minimum one enabled
Two-step verification methods where turning off the last enabled method is refused with an inline error.
Two-step verification
1 method on. Keep a backup in case you lose your phone.
- DefaultAdded March 4 · 1Password
- YubiKey 5C NFC
- Codes sent to •••• 0142
- 7f3k-92pd (used)
- m4qx-18vt
- c9ne-50ra
- w2hb-67ls (used)
- p8dy-31kf
- t5gm-04zc
- r1vj-83nw
- h6sa-29qe
- b3uf-75mx
- k0lz-46yd
Table row toggles
A webhook endpoints table with an Enabled switch per row, a failing endpoint paused, and a live active count.
Webhook endpoints
2 of 3 endpoints receiving events
| Endpoint | Enabled |
|---|---|
api.harborcoffee.com/hooks/ordersorder.created, order.paidHealthy200 · 4 min ago | |
hooks.pipeline.io/t/9f2c1customer.updatedFailingPaused after 5 × 503 | |
hooks.slack.com/services/T04…refund.createdHealthy200 · Yesterday |
Field visibility
Public profile fields with small Public switches that update a live preview of what others see.
Public profile
Choose what people outside your team see.
- Product designer at Northwind
- Lisbon, Portugal
- CompanyProduct designer at Northwind
- LocationLisbon, Portugal
- Emailava.moreno@northwind.app
- Phone+351 912 408 331
Share link settings
A file share panel where a public-link switch reveals a copyable URL plus download, expiry and password options.
Share “Q3 board deck.pdf”
4.2 MB · Edited by Maya Chen
Anyone who has the link can view this file.
Confirm before turning off
A feature flag console with environment tabs and search, where turning a production flag off asks for confirmation first.
Feature flags
3 of 5 onSingle-page checkout with saved payment methods.
PaymentsUpdated 2h agoSuggest replies in the support inbox composer.
SupportUpdated YesterdayMeter API calls and bill overages at month end.
BillingUpdated 3 days agoSend transactional emails with a dark color scheme.
GrowthUpdated Sep 12Keep the v1 CSV export endpoint available.
PlatformUpdated Aug 30
Components are the parts. Blocks are the page.
Pro blocks are whole sections and pages — heroes, pricing, dashboards, auth — composed from the same primitives and themed by the same tokens you already use. Install one and it is yours.
One purchase, yours forever. $99 at launch instead of $249.