Switch
The switch icon represents a toggle or switch control, commonly used in software and interfaces to indicate a binary state (on/off).
Exports at 24 × 24 px
Code
Switch in your framework
In any framework. Customize it above, and the code follows.
export const SwitchIcon = (props: React.SVGProps<SVGSVGElement>) => (
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 15 15" {...props}>
<path fill="currentColor" d="M10.731 3.006q.225.01.442.044l.085.014q.172.03.34.07l.027.008q.063.016.126.035l.062.017l.09.03q.166.053.325.12l.102.045l.09.04q.066.031.128.064l.06.031l.085.047q.152.086.297.18l.07.049a5 5 0 0 1 .5.402a4 4 0 0 1 .383.402l.052.062a4 4 0 0 1 .253.345l.07.11l.045.071l.047.081a5 5 0 0 1 .116.217l.042.085q.023.048.043.096l.048.111l.02.05a5 5 0 0 1 .094.256l.032.099l.027.096l.03.106q.04.165.07.337q.01.051.018.104a4.5 4.5 0 0 1-.089 1.78l-.025.093l-.031.11l-.016.05l-.059.17q-.014.042-.032.084l-.039.1l-.04.097l-.05.11l-.043.085l-.058.114l-.037.065q-.033.06-.068.119l-.045.07q-.034.057-.07.111l-.052.075l-.062.09a5 5 0 0 1-.139.18l-.052.062q-.04.05-.084.098l-.053.058q-.049.053-.099.104l-.048.047a4 4 0 0 1-.17.16l-.073.063l-.089.075l-.065.05a5 5 0 0 1-.202.15l-.07.047l-.118.076l-.055.034q-.06.037-.124.07q-.042.025-.085.048l-.06.032l-.127.062l-.09.041l-.102.045a5 5 0 0 1-.326.12l-.09.03l-.062.017a5 5 0 0 1-.493.113l-.085.014a5 5 0 0 1-.442.045L10.5 12h-6l-.231-.006a4.5 4.5 0 0 1 0-8.988L4.5 3h6zM4.5 4a3.5 3.5 0 1 0 0 7h3.173A4.49 4.49 0 0 1 6 7.5A4.49 4.49 0 0 1 7.673 4zm6 0a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7"/>
</svg>
);Other libraries
Switch in 8 more libraries
Each library draws it its own way. Open one to compare.
Radix Icons
More like it
Icons that share its tags, in the same style.
Search Radix Icons
Skip the copy and paste. With Pro, your AI agent finds and installs any Radix Icons icon from a prompt.
Get ProTags
Browse by tag
Switch is tagged UI, interface, design and 3 more. Related tags follow; each opens its icons from every library.
Pricing
Radix Icons MCP, with Pro
Ask for Switch or any of 342 Radix Icons icons and your agent installs it. The MCP comes with every Pro plan, with 6,000+ blocks and 14 premium templates. The icons stay free.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
What the Switch icon means and where it's used, then how to install, style, label and license it.
The switch icon represents a toggle or switch control, commonly used in software and interfaces to indicate a binary state (on/off). The switch icon originates from electronic switches, where it's used to control the flow of electricity.
In real-world applications, the switch icon appears in software like control panels, settings menus (e.g., iOS, Android), and design tools. It's often used to help users quickly toggle between two states or options.
From a UX perspective, the switch icon communicates a sense of control and agency. It helps users understand that they can toggle between two states or options, making it easier for them to manage their settings or preferences.
Switch is one of 342 icons in Radix Icons, made by WorkOS and released under MIT. It is drawn on a 15 × 15 grid.
Sign in (it's free), then open Get icon, Install with shadcn CLI, and pick your package manager to copy the command. It adds SwitchIcon to components/icons/radix-icons-switch.tsx: one file, a size prop (24 by default) and every SVG prop, with no icon package.
Copy it as React (from Get icon, or the Code section): a typed SwitchIcon component you paste into your project, with no package to install. Only the icons you import reach your bundle. It works in Next.js and any React app.
Yes, if your project has @radix-ui/react-icons: Switch is `SwitchIcon` there, used as <SwitchIcon />. The shadcn.io MCP server answers with that import when it finds the package. Without it, copy the icon from here.
Open Get icon, then Copy as code, and pick Vue, Svelte, Angular, Solid or Preact; the Code section shows each one too. Every version is one self-contained component with the SVG inside, and SVG and data URL copies are there for plain HTML and CSS.
With Pro, the shadcn.io MCP server lets Claude Code, Cursor or any MCP client find the Switch icon, or any of 342 Radix Icons icons, and install it from a prompt.
It's drawn in currentColor, so it takes the text color wherever you use it: a class like text-primary recolors it. To bake a color in, set one in Customize before you copy.
Set width and height on the component, or a class like size-6. It's drawn on a 15 × 15 grid, so it stays sharp at any size. Customize also sets the size it exports at, its padding and rotation.
Yes. It follows the text color, so with text-foreground (or any theme token) it changes with your light and dark themes. The icon is a vector, so it needs no separate dark asset.
Next to a visible label it's decoration: add aria-hidden="true" so screen readers skip it. Standing alone, as in an icon button, give the button a name instead, like aria-label="Switch", so screen readers say what it does.
Yes. SwitchIcon passes every SVG prop to the svg element, so <SwitchIcon aria-hidden="true" /> works, and so do role="img" with aria-label, or a title child, when it carries meaning on its own.
Yes. Open Get icon, then Download file: SVG for code or design tools like Figma; PNG, WebP or JPEG at 512px; or an ICO favicon with 16, 32 and 48px inside. Each one uses what you set in Customize.
Yes. MIT allows commercial use; keep the license notice when you ship the icons' source files. The full terms are in the license, linked on this page.
No visible credit is required: MIT only asks that you keep the license notice if you ship the icons' source files. Icons installed with the shadcn CLI already start with a comment naming Radix Icons, WorkOS and the license.
Yes. Copying and downloading it is free, and the shadcn CLI install only needs a free account.
8 other libraries draw an icon called Switch. The Other libraries section on this page shows each one, so you can compare them and open the one that fits your style.
Its tags are UI, interface, design, icon, control and toggle. Each tag page lists the icons that carry it from every library, which is the quickest way to find a match for Switch in another set.
4.9 out of 5 from 150+ developers
Install Switch from a prompt
MCP, 6,000+ blocks and 14 premium templates in every Pro plan. The icons stay free.
Get Pro