A frame split by a handle, for before and after comparisons and image sliders. On a 24×24 grid in stroke, two-tone, duotone and fill, free under MIT.
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2V5M12 5V19M12 5H19C20.6569 5 22 6.3431 22 8V16C22 17.6569 20.6569 19 19 19H12M12 19V22M8 19H5C3.3431 19 2 17.6569 2 16V8C2 6.3431 3.3431 5 5 5H8"/>
</svg>Also called
What someone searching for this drawing would have typed instead. These are the words the browser's search matches on.
- compare
- before after
- split view
- comparison slider
- difference
- edit preview
Related icons
Closest to before-and-after first: its name counts most, then what people search for it by, then the rest of the Layout shelf.
FAQ
Answered from before-and-after's own facts: its shelf, the styles it was drawn in, its siblings and its dates.
- What is the before-and-after icon for?
- A frame split by a handle, for before and after comparisons and image sliders. It is filed under Layout in Keyline Icons, drawn on the same 24×24 grid as the rest of the set. People look for it as compare, before after, split view, comparison slider, difference and edit preview, and the browser's search matches all of those.
- What styles does the before-and-after icon come in?
- All four: stroke, two-tone, duotone and fill. They are drawn from the same geometry, so swapping style never moves anything.
- Is there a square or circle version of before-and-after?
- No. before-and-after is drawn as a bare glyph, and the set has no boxed variant of it.
- What other icons go with before-and-after?
- table-columns-move-before, table-columns-move-after, table-columns-remove-before, table-columns-remove-after, table-columns-add-before and table-columns-add-after, and 12 more, all shown below. Closest to before-and-after first: its name counts most, then what people search for it by, then the rest of the Layout shelf.
- How do I import before-and-after in React?
- <BeforeAndAfter /> is the component, and the style decides the module: stroke from "@keyline-icons/react", two-tone from "@keyline-icons/react/two-tone", duotone from "@keyline-icons/react/duotone" and fill from "@keyline-icons/react/fill". It takes the usual SVG props plus a size, so <BeforeAndAfter size={16} /> and className="size-4" both work, and there is no provider or theme to set up.
- Where is the before-and-after SVG?
- icons/stroke/before-and-after.svg, icons/two-tone/before-and-after.svg, icons/duotone/before-and-after.svg and icons/fill/before-and-after.svg in the repository, normalised: no wrapper, no ids and no classes to strip out. The tabs above hand you the same drawing as SVG or JSX without the download, and neither needs an install.
- When was before-and-after added to the set?
- Added 25 Nov 2026. It is not in a tagged release yet: it is on the site and in the repository, and the next version will carry it.
Questions about the set rather than about this drawing are answered where they belong. The home page covers what the set is, how the three styles differ, why some icons come boxed and where the Figma file is; installing the set in a shadcn/ui project covers the React package, the CLI and using an icon without React. The MIT licence is stated in the footer of every page.