Skip to content

ClipRangeSelector

Stable

Pick the start and end of the part of a clip to extend, edit or re-do, with the longest length built in.

Also known as trim, clip trimmer, range trim

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Extend from part of an upload

Uploaded clip, kite on the hill

24 seconds

0:11 / 0:24
Part to extend from0:09.0 to 0:15.0 · 6.0 of 10 s max

Up to 10 seconds of a 24-second clip. Drag a handle or the window, use the keys (an arrow is one frame, Shift with an arrow is one second), type the times, or play the clip and press Set start or Set end at the playhead.

When to use it

Lets people choose exactly which part of a clip the AI should extend, edit or re-do, inside the limits the model has.

Made of: Label · Range and length readout · At the limit tag · Filmstrip · Start handle · Window · End handle · Playhead · Status line · Start and end fields · Set at playhead buttons

Use it for

  • Choosing up to 10 seconds of an upload to edit.
  • Picking the part of a take to re-do or extend from.
  • Setting the start and end of a loop.

Not for

Do and avoid

Part to extend from0:09.0 to 0:15.0 · 6.0 of 10 s max
Do. The model limit is built in, so every choice will work.
Part to extend from0:01.0 to 0:20.0 · 19.0 s
Avoid. No limit is set, so a 19 second pick fails later.

Do

  • Set the model's real limit as maxSpanSec, so the limit shows up front.
  • Pair it with a player and pass playhead.
  • Keep the original clip when the edit is applied, and say so.

Avoid

  • Don't let people pick a range that will fail later and then show an error.
  • Don't make dragging the only way to set the range.
  • Don't colour the window with the AI colour. Only the processing dot uses it.

On a phone

  • The handles are 44px wide on touch screens and reach outside the strip edges, so they never cover each other.
  • The number fields and buttons are 44px tall on touch screens and wrap under each other on narrow screens.
  • A touch that starts on the strip does not scroll the page.

Seen in products

  • Google Flow: select a segment of up to 10 seconds from an upload of up to 60 seconds.
  • Sora's Re-cut regenerated a chosen segment, and its Loop editor had start and end handles.
  • Early Runway Aleph edited 5 seconds per generation.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started