Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ter-9001/WannaCut/llms.txt

Use this file to discover all available pages before exploring further.

The timeline is the heart of WannaCut’s editing experience. It is the horizontal workspace at the bottom of the editor where you arrange clips on tracks across time, scrub through your composition, and build the final sequence that gets exported to video. Every edit you make — trimming, reordering, adding effects, keyframing — happens on or in relation to the timeline.
Use Alt + Scroll over the timeline for the fastest, most precise zoom control. It keeps your playhead centered as you zoom in and out, so you never lose your place.

Layout Overview

The timeline is divided into several visual regions:
  • Track controls aside (left) — A fixed-width panel on the left of each track row showing the track type icon, track ID, and action buttons (Lock, Mute, reorder arrows).
  • Scrollable clip area (right) — The main canvas where clips sit. It scrolls horizontally as your sequence grows longer. The minimum width is set to 10,000 pixels so there is always room to extend your edit.
  • Ruler (top) — A horizontal strip above the clip area showing timecode markers. Tick marks appear every 5 seconds, with full HH:MM:SS labels every 30 seconds. Clicking anywhere on the ruler immediately seeks the playhead to that position.
  • Playhead — A bright blue (bg-sky-600) vertical line that spans from the ruler down through all tracks. It shows the current playback position. A small rounded head sits at the top of the line and serves as a drag handle.
  • Resizable height — Drag the thin resize handle at the very top edge of the timeline footer to make the entire timeline panel taller or shorter. The minimum height is 150 px; the maximum is 80% of the window height.

Playhead & Timecode

The playhead marks the current frame in your composition. You can move it in several ways:
  • Click on the ruler — Instantly seeks to the clicked position. WannaCut calls seekTo(), which updates currentTimeRef, moves the playhead DOM element via translateX, and triggers a canvas redraw if playback is paused.
  • Drag the playhead head — Hold down on the rounded blue circle at the top of the playhead and drag left or right for frame-accurate scrubbing.
  • Click anywhere on a track row — Also seeks the playhead to the clicked horizontal position.
The current time is always visible in the timecode display in the timeline toolbar. WannaCut uses the formatTime function to format time as MM:SS.ms (or HH:MM:SS.ms for sequences longer than one hour):
const formatTime = (seconds: number) => {
  const h = Math.floor(seconds / 3600);
  const m = Math.floor((seconds % 3600) / 60);
  const s = Math.floor(seconds % 60);
  const ms = Math.floor((seconds % 1) * 100);
  // Returns HH:MM:SS.ms or MM:SS.ms
};

Zoom

Timeline zoom controls how many pixels represent one second of time. The range is 1 to 200 pixels per second, stored in the pixelsPerSecond state. You can adjust zoom through any of these methods:
MethodAction
Alt + ScrollZoom in (scroll up) or out (scroll down) by 20 px/s per tick
Ctrl/Cmd + =Zoom in by 10 px/s
Ctrl/Cmd + -Zoom out by 10 px/s
Zoom sliderDrag the slider in the timeline toolbar for continuous control
When you zoom, the playhead is visually repositioned so that it stays aligned with the same moment in time — the timeline scrolls to follow.

Magnetic Snapping

Magnetic snapping makes clips automatically jump to the nearest neighbor’s edge when you drag them close, enabling gap-free edits without pixel-perfect precision.
  • Toggle: Press Ctrl + T or click the Snap button in the timeline toolbar. A pulsing LayoutGrid icon indicates snap is active.
  • Behavior: When enabled, the getSnappedTime() function checks only the immediate left and right neighbors on the same track. The clip snaps to the end edge of the clip on its left, or the start edge of the clip on its right — whichever is closer. This context-aware approach prevents a clip from jumping over other clips to reach a distant edge.
// Snap only considers the immediate neighbors on the same track
const leftNeighbor  = [...trackClips].reverse().find(c => c.start <= currentTime);
const rightNeighbor = trackClips.find(c => c.start > currentTime);

Box Selection

You can select multiple clips at once by drawing a rectangular selection box directly on the timeline canvas:
1

Start a box

Click and hold on any empty area of the timeline (not on an existing clip). A blue-tinted selection rectangle begins to form.
2

Drag to size

Drag in any direction to expand the box. Any clip whose bounding rectangle overlaps with the selection box is immediately highlighted as selected.
3

Release

Release the mouse button. All clips inside the box are now selected and can be moved, deleted, or copied together.
Hold Shift before starting the drag to add to an existing selection rather than clearing it first.

Track Controls

Each track row has a control panel on the left with the following elements:

Lock

Click the Lock icon to prevent any edits on that track. Locked tracks reject drag-and-drop, and their clips cannot be moved, resized, or deleted. The lock icon turns violet when active.

Mute

Click the Mute (mic-off) icon to silence all audio output from that track during playback. The clip drop area gains a reddish-wine tint (bg-rose-950/30) as a visual reminder that the track is muted. The mute icon turns violet when active.

Move to Top

The up-arrow (↑↑) button on non-audio, non-first tracks moves the track to position zero, shifting all other tracks down by one ID. Clips are re-assigned accordingly.

Move Up One

The single-arrow (↑) button swaps the track with the one immediately above it in the sorted render order.

Keyboard Navigation

WannaCut provides a full set of keyboard shortcuts for timeline navigation. None of these fire when focus is inside a text input or editable element.
ShortcutAction
SpaceToggle play / pause
Ctrl + .Jump to the next clip cut point
Ctrl + ,Jump to the previous clip cut point
Alt + .Advance playhead by 0.01 s (one centi-second step forward)
Alt + ,Retreat playhead by 0.01 s (one centi-second step backward)
Ctrl/Cmd + ZUndo (up to 100 steps)
Ctrl/Cmd + Y / Ctrl+Shift+ZRedo
Ctrl + TToggle magnetic snapping
Alt+SSplit clip at playhead
Ctrl/Cmd + CCopy selected clips
Ctrl/Cmd + VPaste clips at playhead
Ctrl + QSplit and select everything to the left of the playhead
Ctrl + WSplit and select everything to the right of the playhead
Delete / BackspaceDelete selected clips or assets
Ctrl/Cmd + EnterExport video

Build docs developers (and LLMs) love