Gentleface › Layout & interface › toggle
toggle icon
toggleToggle: toggle, toggle on, enabled, switch on. Drawn on the 16 px grid. Free SVG, PNG and code, MIT licensed. Part of the free toolbar icon set.
Animated toggle-slide · line-round
The knob presses back, runs to the far end stretching as it goes, and squashes on arrival while the pill gives a little. It holds, then runs back and does the same.
Native SVG animation, with no CSS or script. It loops by itself. Inline it to take the text color: in an <img> it draws black. To play it once on hover or click, run 0.3 s to 2.45 s. Examples and helper.
Code line-round
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M11.84 3.351C12.482 3.605 13.047 3.976 13.536 4.464C14.024 4.953 14.395 5.518 14.649 6.16C14.883 6.751 15 7.364 15 8C15 8.636 14.883 9.249 14.649 9.84C14.395 10.482 14.024 11.047 13.536 11.536C13.047 12.024 12.482 12.395 11.84 12.649C11.249 12.883 10.636 13 10 13L6 13C5.364 13 4.751 12.883 4.16 12.649C3.518 12.395 2.953 12.024 2.464 11.536C1.976 11.047 1.605 10.482 1.351 9.84C1.117 9.249 1 8.636 1 8C1 7.364 1.117 6.751 1.351 6.16C1.605 5.518 1.976 4.953 2.464 4.464C2.953 3.976 3.518 3.605 4.16 3.351C4.751 3.117 5.364 3 6 3L10 3C10.636 3 11.249 3.117 11.84 3.351ZM10 6C8.895 6 8 6.895 8 8C8 9.105 8.895 10 10 10C11.105 10 12 9.105 12 8C12 6.895 11.105 6 10 6Z"/></svg>
// Gentleface "toggle" (line-round), MIT. https://gentleface.com/icons/toggle
import type { SVGProps } from 'react';
export function ToggleIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
<path d="M11.84 3.351C12.482 3.605 13.047 3.976 13.536 4.464C14.024 4.953 14.395 5.518 14.649 6.16C14.883 6.751 15 7.364 15 8C15 8.636 14.883 9.249 14.649 9.84C14.395 10.482 14.024 11.047 13.536 11.536C13.047 12.024 12.482 12.395 11.84 12.649C11.249 12.883 10.636 13 10 13L6 13C5.364 13 4.751 12.883 4.16 12.649C3.518 12.395 2.953 12.024 2.464 11.536C1.976 11.047 1.605 10.482 1.351 9.84C1.117 9.249 1 8.636 1 8C1 7.364 1.117 6.751 1.351 6.16C1.605 5.518 1.976 4.953 2.464 4.464C2.953 3.976 3.518 3.605 4.16 3.351C4.751 3.117 5.364 3 6 3L10 3C10.636 3 11.249 3.117 11.84 3.351ZM10 6C8.895 6 8 6.895 8 8C8 9.105 8.895 10 10 10C11.105 10 12 9.105 12 8C12 6.895 11.105 6 10 6Z" />
</svg>
);
}Vue: see /icons/toggle.md
Svelte: see /icons/toggle.md
HTML img: see /icons/toggle.md
CSS: see /icons/toggle.md
Data URL: see /icons/toggle.md
Sprite: see /icons/toggle.md
SwiftUI: see /icons/toggle.md
Compose: see /icons/toggle.md
Android XML: see /icons/toggle.md
Flutter: see /icons/toggle.md
Each icon is drawn on the 16 px grid, and most also on the 20 and 24 px grids (at 24 in three weights: light 1 px, regular 1.5 px, bold 2 px). Show the drawing made for your size, or an exact multiple of it, on whole pixels: 16 for 16 and 32 px, 20 for 20 and 40, 24 for 24 and 48. A size in between or a fractional position blurs it. The code on each icon page is the 16 px drawing, an SVG with fill="currentColor"; the icon page's downloads follow its Grid switch, and npm has the 20 and 24 px drawings too. The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. More in how to use.
With npm: import { ToggleIcon } from '@gentleface/react'; (setup).
Meaning
- Use it for
- toggle, toggle on, enabled, switch on, toggle switch
- Alternatives
toggle-off: the off state (toggle-off)checkbox: a check box in a form (checkbox)
- Don’t confuse with
arrow-left-right: arrow-left-right owns switch as in swap (swap), not on/off
- Also fits
- toggle off: the on state (toggle-on)
- toggles: one switch in its on state (toggle)
- Not for
- swap (use
arrow-left-right): toggle is an on/off switch control, not swapping two things - light switch (use
light-switch): toggle is the UI switch control - progress bar (use
progress-bar): a capsule with a knob is the on/off switch - segmented control (use
segmented-control): toggle is a two-state switch with a knob - slider (use
slider): an on/off switch (toggle) - feature flag (use
flag-code): the UI switch control
- swap (use
- Tags
- toggle, switch, on, enabled, setting, option, active
- Category
- Layout & interface
- Component name
ToggleIcon- History
- added
- released in 0.1.0
- 20 px drawn, 24 px drawn
- Since
- version 0.1.0
Family 92
More layout & interface icons
app apps apps-alert apps-check apps-clock apps-gear apps-link apps-off apps-pencil apps-plus apps-search apps-shield apps-sparkle apps-x cards-stacked checkbox · all layout & interface icons
For agents
Metadata: /icons/toggle.json · Markdown: /icons/toggle.md · SVG: https://gentleface.com/svg/{style}/16/toggle.svg · PNG: https://gentleface.com/png/{style}/{16|32|48}/toggle.png