Gentleface › Layout & interface › segmented-control
segmented-control icon
segmented-controlSegmented control: segmented control, toggle group, button group, segmented button. Drawn on the 16 px grid. Free SVG, PNG and code, MIT licensed.
Animated segmented-control-select · line-round
The selection moves to the right segment with its leading edge first, so it stretches and then closes up, and the end of the bar gives. It then crosses to the left segment the same way and returns to the middle.
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.5 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="M12 4C12.254 4 12.5 4.047 12.736 4.14C12.993 4.242 13.219 4.391 13.414 4.586C13.609 4.781 13.758 5.007 13.86 5.264C13.953 5.5 14 5.746 14 6L14 9C14 9.254 13.953 9.5 13.86 9.736C13.758 9.993 13.609 10.219 13.414 10.414C13.219 10.609 12.993 10.758 12.736 10.86C12.5 10.953 12.254 11 12 11L3 11C2.746 11 2.5 10.953 2.264 10.86C2.007 10.758 1.781 10.609 1.586 10.414C1.391 10.219 1.242 9.993 1.14 9.736C1.047 9.5 1 9.254 1 9L1 6C1 5.746 1.047 5.5 1.14 5.264C1.242 5.007 1.391 4.781 1.586 4.586C1.781 4.391 2.007 4.242 2.264 4.14C2.5 4.047 2.746 4 3 4L12 4ZM3 5C2.873 5 2.75 5.023 2.632 5.07C2.504 5.121 2.391 5.195 2.293 5.293C2.195 5.391 2.121 5.504 2.07 5.632C2.023 5.75 2 5.873 2 6L2 9C2 9.127 2.023 9.25 2.07 9.368C2.121 9.496 2.195 9.609 2.293 9.707C2.391 9.805 2.504 9.879 2.632 9.93C2.75 9.977 2.873 10 3 10L5 10L5 5L3 5ZM10 10L12 10C12.127 10 12.25 9.977 12.368 9.93C12.496 9.879 12.609 9.805 12.707 9.707C12.805 9.609 12.879 9.496 12.93 9.368C12.977 9.25 13 9.127 13 9L13 6C13 5.873 12.977 5.75 12.93 5.632C12.879 5.504 12.805 5.391 12.707 5.293C12.609 5.195 12.496 5.121 12.368 5.07C12.25 5.023 12.127 5 12 5L10 5L10 10Z"/></svg>
// Gentleface "segmented-control" (line-round), MIT. https://gentleface.com/icons/segmented-control
import type { SVGProps } from 'react';
export function SegmentedControlIcon(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="M12 4C12.254 4 12.5 4.047 12.736 4.14C12.993 4.242 13.219 4.391 13.414 4.586C13.609 4.781 13.758 5.007 13.86 5.264C13.953 5.5 14 5.746 14 6L14 9C14 9.254 13.953 9.5 13.86 9.736C13.758 9.993 13.609 10.219 13.414 10.414C13.219 10.609 12.993 10.758 12.736 10.86C12.5 10.953 12.254 11 12 11L3 11C2.746 11 2.5 10.953 2.264 10.86C2.007 10.758 1.781 10.609 1.586 10.414C1.391 10.219 1.242 9.993 1.14 9.736C1.047 9.5 1 9.254 1 9L1 6C1 5.746 1.047 5.5 1.14 5.264C1.242 5.007 1.391 4.781 1.586 4.586C1.781 4.391 2.007 4.242 2.264 4.14C2.5 4.047 2.746 4 3 4L12 4ZM3 5C2.873 5 2.75 5.023 2.632 5.07C2.504 5.121 2.391 5.195 2.293 5.293C2.195 5.391 2.121 5.504 2.07 5.632C2.023 5.75 2 5.873 2 6L2 9C2 9.127 2.023 9.25 2.07 9.368C2.121 9.496 2.195 9.609 2.293 9.707C2.391 9.805 2.504 9.879 2.632 9.93C2.75 9.977 2.873 10 3 10L5 10L5 5L3 5ZM10 10L12 10C12.127 10 12.25 9.977 12.368 9.93C12.496 9.879 12.609 9.805 12.707 9.707C12.805 9.609 12.879 9.496 12.93 9.368C12.977 9.25 13 9.127 13 9L13 6C13 5.873 12.977 5.75 12.93 5.632C12.879 5.504 12.805 5.391 12.707 5.293C12.609 5.195 12.496 5.121 12.368 5.07C12.25 5.023 12.127 5 12 5L10 5L10 10Z" />
</svg>
);
}Vue: see /icons/segmented-control.md
Svelte: see /icons/segmented-control.md
HTML img: see /icons/segmented-control.md
CSS: see /icons/segmented-control.md
Data URL: see /icons/segmented-control.md
Sprite: see /icons/segmented-control.md
SwiftUI: see /icons/segmented-control.md
Compose: see /icons/segmented-control.md
Android XML: see /icons/segmented-control.md
Flutter: see /icons/segmented-control.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 { SegmentedControlIcon } from '@gentleface/react'; (setup).
Meaning
- Use it for
- segmented control, toggle group, button group, segmented button
- Don’t confuse with
- Also fits
- button element: several joined buttons (button-group)
- tabs: switch views inside a section of a page (segmented-control)
- Tags
- segmented control, segmented button, toggle group, button group, segments, switch, tabs, view switcher, options, ui control
- Category
- Layout & interface
- Component name
SegmentedControlIcon- History
- added
- released in 0.2.0
- 20 px drawn, 24 px drawn
- 20 px redrawn
- Since
- version 0.2.0
More layout & interface icons
accordion 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 breadcrumb · all layout & interface icons
For agents
Metadata: /icons/segmented-control.json · Markdown: /icons/segmented-control.md · SVG: https://gentleface.com/svg/{style}/16/segmented-control.svg · PNG: https://gentleface.com/png/{style}/{16|32|48}/segmented-control.png