Resize and scroll

cursor: ew-resize in CSS: the left-right resize arrow

ew-resize is the left-right double arrow. It says 'drag this edge either way'.

cursor: ew-resize; Move your mouse over this box Cursors only appear with a mouse or trackpad. Open this page on a computer to see this one.
This is the cursor your browser and system draw for ew-resize.

What it shows

Windows draws Horizontal Resize (the SizeWE role, aero_ew.cur). macOS shows its left-right resize arrow.

Usage

When to use it

Use it for

  • Left and right edges of panels and boxes that can get both wider and narrower.
  • The divider of a before-and-after image comparison that you drag sideways.
  • Range sliders built from a draggable handle, when you want the arrow instead of a hand.

Avoid it for

  • Table column borders. col-resize is the convention there.
  • Things that only scroll sideways. Scrolling needs no special cursor.

Code

Copy the snippet

CSS
.compare-handle { cursor: ew-resize; }
HTML
<div class="compare">
  Before | After<div class="compare-handle" role="slider" aria-label="Compare" aria-valuenow="50"></div>
</div>

Support

Browsers and systems

Browser support for ew-resize
BrowserSupport
Chrome1
Edge12
Firefox1.5
Safari3
Safari on iOSno
Chrome on Android18
The matching operating system cursor
SystemMatching cursor
Windows roleSizeWE
Windows fileaero_ew.cur
macOSResize left-right

Watch out

Gotchas

  • On Windows, e-resize, w-resize and ew-resize all show the same Horizontal Resize cursor.
  • If the handle is a slider, give it role="slider" and arrow-key support. The cursor alone does not make it usable.

Free cursors

A custom ew-resize cursor

The same cursor from each of our packs, free under CC0. Move your mouse over one to try it, or open it for the .cur file, the PNG and the CSS.

FAQ

Questions

What is the difference between ew-resize and col-resize?
ew-resize is a plain double arrow for stretching an edge. col-resize adds a bar and reads as 'move this divider'. Both are fine on a splitter.
Which Windows cursor is ew-resize?
Horizontal Resize, stored as SizeWE (aero_ew.cur).
Does the browser use ew-resize anywhere by itself?
Yes. Chrome shows it over the grip of an element with resize: horizontal.