Skip to content

Patina Dock

A command dock that wears in where it is used: habits animate less, brighten where you press, show their shortcut and move to the front on commit, and a readout says what changed.

DOM + CSS0 deps1 file · 44 KB TSXreduced-motion aware

ProUltraminimal
Preview

Props

60

The source is part of Pro

$27/month or $179 once. See Pro

No runtime dependencies
"use client";

import { useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
import type { CSSProperties, KeyboardEvent as ReactKeyboardEvent, ReactNode } from "react";

/**
 * PatinaDock — a command dock that wears in where you use it: habits get faster, brighter and closer, and the dock says what it changed.
 *
 * Every press is counted on the device and decays with a 14-day half-life.
 * Habitual actions stop animating (the press shortens from about 280ms
 * toward instant), gain a soft burnish where they are usually pressed, show
 * their shortcut, and a static notch marks the usual next action. With
 * adapt="full" they also move toward the front, only on commit (600ms
 * after the pointer leaves), never under the pointer, with FLIP and an
 * announcement. A readout states the change in numbers; "Forget what I
 * use" clears it. simulate={{ day, seed }} replays a deterministic log.
 *
 * Part of the Ultra kit: an adaptive style whose grammar is the viewer. Every

  // ---------------------------------------------------------------
  // Full source available with a viberdy Pro subscription.
  // https://viberdy.dev/pricing
  // ---------------------------------------------------------------
}
Details

About this component

Interfaces treat the hundredth press like the first: the same animation, the same position, the same hidden shortcut. Patina Dock wears in. Every press is counted on the device and fades with a two-week half-life, so the dock knows your habits and lets them go when you do. Habitual actions stop performing for you: their press animation shortens from about 280ms toward instant, following the rule that what you do many times a day should not animate. They brighten with a soft burnish where you usually press, their shortcut hint appears, and a static notch marks the action that usually comes next. With adapt set to full, habits move toward the front, but only on commit, never under the pointer, and the move is announced. A readout states what changed in plain numbers, and one tap forgets everything. The preview replays sixty days in a slider.

Curator’s note

The Ultra kit's workflow surface. Pro: a stateful usage model (decayed counters, press-point averaging, an order-1 next-action table, hysteresis re-sort on commit with FLIP) that habituates motion per action, plus a deterministic replay for demos.

Pairs well with

Aura Dial

components
Pro

Keylight Field

backgrounds
Pro

Ultra Site

site templates