Dashral Pro is hereSee pricing

Dashral

Integration OrbitPro

The services an app connects to as a living orbit: connected ones circle close in and send light to the middle, a tile widens into its panel to connect or disconnect, and travels between the rings.

Installation

When to use

  • An integrations page or an onboarding step: what's connected at a glance, and one click to connect the next.
  • A "Works with your stack" section on a landing page, where the orbit itself shows what the product talks to.

When not to use

  • Many integrations to search and filter (past about 16): a list or a grid of cards finds one faster.
  • Settings with many fields per integration: open a page or a Sheet; the panel holds a few lines and an action.

Usage

Integration Orbit with your own data: a whole component you can paste as a page.

example.tsx
"use client"

import { IntegrationOrbit } from "@/components/dashral/pro/integration-orbit"

import { useState } from "react"

// Your services, with their logos.
const services = [
  { id: "slack", name: "Slack", icon: <img src="/logos/slack.svg" alt="" />, description: "Alerts in your channels" },
  { id: "github", name: "GitHub", icon: <img src="/logos/github.svg" alt="" />, description: "Issues and pull requests" },
  { id: "stripe", name: "Stripe", icon: <img src="/logos/stripe.svg" alt="" />, description: "Payments and payouts" },
]

export default function Integrations() {
  const [connected, setConnected] = useState(["slack"])
  const items = services.map((service) => ({
    ...service,
    status: connected.includes(service.id) ? ("connected" as const) : ("available" as const),
  }))

  return (
    <IntegrationOrbit
      items={items}
      // Your API calls; a thrown Error's message shows in the panel.
      onConnect={async (item) => {
        await fetch(`/api/integrations/${item.id}`, { method: "POST" })
        setConnected((ids) => [...ids, item.id])
      }}
      onDisconnect={async (item) => {
        await fetch(`/api/integrations/${item.id}`, { method: "DELETE" })
        setConnected((ids) => ids.filter((id) => id !== item.id))
      }}
    />
  )
}

API reference

IntegrationOrbit

An orbit of integrations around your app: connected ones close in, the rest further out, each opening into its panel to connect or disconnect it. Pass items with their status and onConnect / onDisconnect.

PropTypeDefault
itemsOrbitIntegration[]

Required.

—
centerReact.ReactNode

What sits in the middle: your app's logo. A generic mark by default.

—
centerLabel(connected: number) => React.ReactNode

Under the middle; "{count} connected" by default (the count counts as it changes).

(n) => `${n} connected`
onConnect(item: OrbitIntegration) => Promise<void> | void

Connects one from its panel; a thrown Error's message shows in the panel. Without it there's no Connect button.

—
onDisconnect(item: OrbitIntegration) => Promise<void> | void

Disconnects one from its panel, likewise.

—
onSelect(item: OrbitIntegration | null) => void

Called as a panel opens (null as it closes).

—
renderDetail(item: OrbitIntegration) => React.ReactNode

More in a panel, under the description (settings, the last sync…).

—
speednumber

Turns per minute of the inner ring (the outer one turns the other way, slower); 0 keeps it still.

0.6
statusLabelsPartial<Record<IntegrationStatus, string>>

The words for each status, on a tile's label and in its panel.

—
labelstring

Names the orbit for screen readers; "Integrations" by default.

"Integrations"
classNamestring—
classNamesIntegrationOrbitClassNames—

type IntegrationStatus

= "connected" | "available" | "syncing" | "error"

type OrbitIntegration

PropTypeDefault
idstring—
namestring—
iconReact.ReactNode

Its logo, on a 24px grid.

—
statusIntegrationStatus—
descriptionstring

One line on what it does, in its panel.

—
classNamestring

Its tile's classes, e.g. a brand's tile colours ("bg-white text-[#635bff]").

—

type IntegrationOrbitClassNames

PropTypeDefault
rootstring—
tilestring—
hubstring—
panelstring—

Keyboard

KeysAction
TabReach the orbit (one tab stop) and leave it
←or→ or ↑or↓The previous or next service, the inner ring first; the orbit stops while one has focus
HomeorEndThe first or last service
EnterorSpaceOpen its panel
EscapeClose the panel, back to its tile

Accessibility

  • A group of buttons named by `label`; each says its service and status ("Slack, Connected") and opens a dialog named after it.
  • The rings, lines, moving light, status dots and the name under a tile are hidden from screen readers: the button's name says the same.
  • Focus goes into the panel's action as it opens and back to the tile as it closes; an error from onConnect or onDisconnect is announced in the panel.

Motion

  • The inner ring turns slowly one way and the outer one slower the other way (`speed`), tiles staying upright. Hover or focus a tile and the turning eases to a stop, the tile lifts, the others fade back and a line draws out to it; leave and it eases back up.
  • A connected service sends a small light in to the middle now and then, each in its own time; one syncing has an arc running round its tile.
  • A tile widens into its panel in the middle (0.42 s) while the orbit steps back; closing, the panel shrinks back onto the tile and fades as the tile shows again. After a connect or disconnect the tile then travels along its arc to its new ring (0.8 s), the others making room, and the count in the middle counts to its new number.
  • Smooth tweens on [0.4, 0, 0.2, 1], never springs. With reduced motion the orbit keeps still, no light runs, and tiles move between rings at once.