ZeroGravity UI

Scrollstable

Tether

Scroll-drawn path

An SVG path that draws itself as its section scrolls: timelines, connectors and routes.

  1. 01Sketch
  2. 02Prototype
  3. 03Review
  4. 04Ship
scrolls inside this frame

Customize

Patha non-scaling stroke, measured on screen
variant
fit
2.00 pxstrokeWidth
Scroll windowfractions of the viewport height
0.90start
0.50end

Usage

TSX
import { Tether } from "zerogravity/tether"

<Tether
    d="M 50 0 C 80 60, 20 90, 50 150"
    viewBox="0 0 100 150"
/>

Generated from the controls above. Only props that differ from their defaults are shown.

Props

15 documented props on Tether
PropertyTypeDefaultDescription
variant"pixel" | "classic" | "minimal""pixel"Style.
fit"contain" | "stretch""contain"Fit.
strokeWidthnumber2Stroke. Range 1 to 10 px.
startnumber0.9Starts at. Range 0.2 to 1.2.
endnumber0.5Ends at. Range -0.2 to 0.9.
linecap"round" | "butt" | "square""square" in pixel, "round" in classicEnd caps of the drawn line.
dstring—SVG path data in viewBox units.
viewBoxstring"0 0 100 100"Coordinate box of the path.
progressnumber—0 to 1. Drives the path directly and turns scrolling off.
strokestring"currentColor"Colour of the drawn line.
trackstring | falsefaint greyThe full-length path underneath.
trackDashstring—Dash pattern of the track.
scrollContainerRefObject<HTMLElement>the windowScroll inside an element instead of the page.
onProgress(progress: number) => void—Called when the drawn amount changes.
childrenReactNode—Laid over the path: steps, labels, markers.

Dependencies

0 external runtime dependencies

Ships with nothing but React.