Skip to content
Added 2 Sept 2026
Back to library
crop-frame-image-15717
Crop Frame Image
Avatars & Images

Crop Frame Image

Photo under a crop tool: corner handles and rule-of-thirds guides frame a square selection that stretches to a widescreen box on hover while the pixel readout swaps beneath it.

Avatars & Imagescropeditorhandlesaspectimage
lines of CSS
66lines of CSS
dependencies
0dependencies
browser, for years
Everybrowser, for years
motion only on interaction
Hovermotion only on interaction
Backdrop
1:1 · 1080 × 108016:9 · 1920 × 1080
Open a live copy in

Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.

crop-frame-image-15717.css
.fx-v14-av-crop-15716 {
  position: relative;
  width: 216px;
  height: 132px;
  border-radius: 0.7rem;
  overflow: hidden;
  background:
    radial-gradient(55% 75% at 30% 25%, #fb923c, transparent 65%),
    radial-gradient(60% 80% at 78% 70%, #38bdf8, transparent 65%),
    linear-gradient(150deg, #7c3aed, #0f172a);
}
.fx-v14-av-crop-15716 .cr {
  position: absolute;
  top: 8px;
  left: 60px;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 999px rgba(2,6,23,0.62);
  transition: top 0.45s ease, left 0.45s ease, width 0.45s ease, height 0.45s ease;
}
.fx-v14-av-crop-15716 .cr::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 33.33%;
  width: 33.34%;
  border-left: 1px solid rgba(255,255,255,0.25);
  border-right: 1px solid rgba(255,255,255,0.25);
}
.fx-v14-av-crop-15716 .cr::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 33.33%;
  height: 33.34%;
  border-top: 1px solid rgba(255,255,255,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.fx-v14-av-crop-15716 .cr b { position: absolute; width: 12px; height: 12px; border: 2px solid #f8fafc; }
.fx-v14-av-crop-15716 .cr b:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.fx-v14-av-crop-15716 .cr b:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.fx-v14-av-crop-15716 .cr b:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.fx-v14-av-crop-15716 .cr b:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.fx-v14-av-crop-15716 .rd {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 2;
  display: grid;
  padding: 0.16rem 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6rem;
  color: #e2e8f0;
  background: rgba(2,6,23,0.75);
  border: 1px solid #334155;
  border-radius: 999px;
  transform: translateX(-50%);
}
.fx-v14-av-crop-15716 .rd i { grid-area: 1 / 1; font-style: normal; text-align: center; white-space: nowrap; transition: opacity 0.3s ease; }
.fx-v14-av-crop-15716 .two { opacity: 0; }
.fx-v14-av-crop-15716:hover .cr { top: 24px; left: 18px; width: 180px; height: 66px; }
.fx-v14-av-crop-15716:hover .one { opacity: 0; }
.fx-v14-av-crop-15716:hover .two { opacity: 1; }
crop-frame-image-15717.html
<div class="fx-v14-av-crop-15716">
  <div class="cr">
    <b></b>
    <b></b>
    <b></b>
    <b></b>
  </div>
  <div class="rd">
    <i class="one">1:1 · 1080 × 1080</i>
    <i class="two">16:9 · 1920 × 1080</i>
  </div>
</div>

What do I do with this?

  1. Put crop-frame-image-15717.css anywhere your page already loads CSS from — in Next.js that is app/globals.css, or any stylesheet with a <link> in your HTML.
  2. Then put the class on the element you want it on: <button class="fx-v14-av-crop-15716">. The CSS does nothing until a class name in it matches something on the page.
  • Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add crop-frame-image-15717

What's included

  • The markup and the stylesheet, in whichever framework you pick
  • No runtime dependencies

Works with

  • React
  • Vue
  • Svelte
  • Tailwind
  • styled-components
  • Plain CSS

npx hoverlab add crop-frame-image-15717

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Motion safety

Static estimate, read from the CSS

Reduced motion
Brief motion, no guard

Animates briefly or on interaction. Only looping motion gets a guard in this catalog; copy the one from the Insights tab if this ships on a critical path.

What it animates
Reflows

Animates height, left, top, width. The browser re-lays-out the page on every frame; prefer transform if you can.

Flashing (WCAG 2.3.1)
No flashing found

No repeating change in opacity, colour or brightness large enough to count as a flash.

Layout shift (CLS)
May shift layout

Animates height, left, top, width on a box in flow, so content beside or after it can move. A category from the CSS, not a measurement for this effect.

Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed

31 more effects in Avatars & Images

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Avatars & Images

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

7 variations of Crop Frame Image

Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.