React Registry

componentRange Selection@techsquidtv/canvas-timeline-react

Range Selection

Accessible, full-height timeline range selector built on @base-ui/react for loop, export, or selection boundaries.

Range selection preview

In and out handles framing a timeline range on the same surface as a draggable playhead.

Open full demo

Installation

pnpm
pnpm add @techsquidtv/canvas-timeline-react
  1. 1

    Install the package.

    The command above adds the React bindings and their package dependencies.

  2. 2

    Import from the React entrypoint.

    @techsquidtv/canvas-timeline-react
  3. 3

    Add the timeline styles.

    Use the full stylesheet with shadcn-compatible tokens, or base.css when your app owns the visual theme.

    Default visuals
    import '@techsquidtv/canvas-timeline-react/styles.css';
    Base geometry
    import '@techsquidtv/canvas-timeline-react/base.css';

Usage

RangeHandles.tsx
import { Timeline } from '@techsquidtv/canvas-timeline-react';
export function RangeHandles() {
return <Timeline.RangeSelector />;
}

Notes

  • Render these components inside a TimelineProvider so they can read the shared TimelineEngine.
  • Import @techsquidtv/canvas-timeline-react/styles.css when your app defines shadcn-compatible semantic tokens, or base.css when supplying your own theme.
  • CSS styles interaction layers; renderer theme styles canvas-painted timeline visuals.
  • Use the theming guide when CSS tokens should drive canvas-painted colors.
  • Requires react-dom alongside React because the headless slider interaction layer is provided by Base UI.
  • The default component keeps only the two thumbs pointer-active so clips, blank lanes, and playhead interactions can pass through.

API Reference

Range Selection

Accessible, full-height timeline range selector built on @base-ui/react for loop, export, or selection boundaries.

Exports

NameReferenceDescription
Timeline.RangeSelectorNamespace exportFull-height timeline overlay for dragging In/Out boundaries with Base UI slider semantics.
Timeline.RangeSelector.RootNamespace exportProvider-aware Base UI root for custom dual-thumb range controls.
Timeline.RangeSelector.ControlNamespace exportWrapper around Slider.Control interaction zone.
Timeline.RangeSelector.TrackNamespace exportWrapper around Slider.Track track boundary.
Timeline.RangeSelector.IndicatorNamespace exportWrapper around Slider.Indicator representing active loop area.
Timeline.RangeSelector.ThumbNamespace exportInteractive thumb for In or Out points (specifying index).

Props and Inputs

NameTypeDescription
inPointChildrenReactNode | (props) => ReactNodeOptional custom content for the In-point grabber, rendered inside the Base UI thumb.
outPointChildrenReactNode | (props) => ReactNodeOptional custom content for the Out-point grabber, rendered inside the Base UI thumb.
snapbooleanWhether pointer-driven boundary edits should snap to timeline targets.