Developers

Build with the VisQuill GDK

Geometric primitives, reactive values, constraints and built-in interaction, all fully typed in TypeScript. Everything needed for maps, profiles and tools that people can drag, zoom and explore.

Get started

Install and scaffold

Install

Available as an npm package for any modern TypeScript project.

npm install @visquill/visquill-gdk

Scaffold

Start a new project, either minimal or with a MapLibre map.

npm create visquill@latest

Available as create-visquill on npm.

Minimal example

A draggable handle with a tracking circle

Styled with CSS classes, the recommended approach. Each class name combines the prefix passed to VisQuill.create with the visual's name, for example .my-graphic-ring.

import { VisQuill, Reactive, Circles, Attach } from "@visquill/visquill-gdk"

/**
 * A draggable handle with a circle that tracks it reactively.
 * Styles are defined in a CSS file using the prefix chain.
 *
 * @param div - The div element that will contain the graphic
 */
export function run(div: HTMLDivElement) {
    const rvg    = VisQuill.create(div, "my-graphic-")
    const canvas = rvg.canvas

    // A draggable handle — class: "my-graphic-handle"
    const handle = canvas.handles.disk("handle", { x: 300, y: 200 })

    // A circle that follows the handle — class: "my-graphic-ring"
    const ring = canvas.visuals.circle("ring")

    Reactive.do([handle], () => {
        Circles.circleAt(handle, 60, ring)
    })

    // A label that stays above the handle — class: "my-graphic-label"
    const label = canvas.text.label("", "label")
    Attach.pointToPoint(label, handle, { offset: { x: 0, y: -80 } })

    Reactive.do([handle], () => {
        label.value = `${Math.round(handle.x)}, ${Math.round(handle.y)}`
    })
}

See the guide for a full walkthrough, or browse the Lab for more complex examples.

Custom work

Need something built?

Custom visualization projects built on the GDK, from a single interactive chart to complete visual tools.

Learn more