ef-trim-handles

Draggable start/end trim handles. Overlays onto a thumbnail strip or track.

Renders draggable in/out handles with dimmed overlay regions. Fires trim-change events as the user drags. Typically layered over an ef-thumbnail-strip.

html
<div style="position: relative; height: 56px;">
  <ef-thumbnail-strip target="my-video" use-intrinsic-duration thumbnail-height="56"
    style="display: block; width: 100%; height: 56px;"></ef-thumbnail-strip>
  <ef-trim-handles intrinsic-duration-ms="5000" seek-target="my-video"
    style="position: absolute; inset: 0;"></ef-trim-handles>
</div>
js
document.querySelector('ef-trim-handles').addEventListener('trim-change', (e) => {
  const { startMs, endMs } = e.detail.value;
});

--trim-handle-color, --trim-handle-active-color, and --trim-overlay-color are part of the shared theme (ef-theme.css) rather than local to this component — override them globally, or scope an override to a specific ef-trim-handles instance the same way.

css
ef-trim-handles::part(handle-inner) { background: #e94560; }

Attributes

6 of 6

element-id

React prop
elementId
Type
string
Default
""
Description
ID of the element these trim handles edit, included in the trim-change event detail.

intrinsic-duration

React prop
intrinsicDuration
Type
number
Default
—
Description
Untrimmed source duration in seconds, used to compute drag bounds.

mode

React prop
mode
Type
standalone | track
Default
—
Description
standalone (full overlay + draggable region) or track (handles pinned at container edges, for use inside a timeline track).

pixels-per-second

React prop
pixelsPerSecond
Type
number | null
Default
—
Description
Zoom level — pixels rendered per second of composition time.

seek-target

React prop
seekTarget
Type
string
Default
""
Description
ID of a temporal element to seek as the user drags a handle.

show-overlays

React prop
showOverlays
Type
boolean
Default
true
Description
Shows dimmed overlays over the trimmed-away portions.

Slots

CSS Parts

CSS Custom Properties

Events