Knit UI
GitHub

Playground

Loading playground…

Playground
<LineLayer />

Examples

Basic

A simple constant-width stroke along the route.

Loading example…

BasicSourceStorybook

Data Driven

Data-driven: lineWidth is interpolated by zoom, so the route is a thin hairline when zoomed out and a bold stroke when zoomed in.

Loading example…

Data DrivenSourceStorybook

Dashed

A dashed line — good for boundaries, planned routes, or footpaths.

Loading example…

DashedSourceStorybook

Thick Route

A thick, rounded route casing — bold cap and join for a smooth path.

Loading example…

Thick RouteSourceStorybook

Styling Variations

Styling variations: a soft, blurred glow stroke with a widened gap, layered to read like a highlighted corridor.

Loading example…

Styling VariationsSourceStorybook

Props

PropTypeDefaultDescription
afterIdstring | undefined——
beforeIdstring | undefined——
filterFilterSpecification | undefined——
idstring | undefined——
layerIndexnumber | undefined——
layoutRecord<string, unknown> | undefined——
maxzoomnumber | undefined——
minzoomnumber | undefined——
paintRecord<string, unknown> | undefined——
sourcestring | undefined——
source-layerstring | undefined——
sourceLayerstring | undefined——
styleLineLayerStyle | undefined——
testIDstring | undefined——

Edit this page on GitHub