Foundations

Haptics.

Feedback you can choose.

Meaningful events, optional device adapters, and visual feedback that always stands on its own.

Meaningful feedback, optional delivery

Selection, toggle, snap, success and warning describe events, not hardware. The optional feedback entry defaults to no output. Enable vibration only by choice; reduced motion or effects suppress it. The visual result never depends on device feedback.

Feedback is optional. Every action has a visible result.

Vibration depends on browser, device and permissions. No delivery is guaranteed.

haptics-example.tsx
import "@dixy-ui/react/styles.css";
import { Theme } from "@dixy-ui/react";
import { useState } from "react";
import {
  Button,
  Inline,
  Stack,
  Text,
  Theme as FeedbackScope,
} from "@dixy-ui/react";
import {
  FeedbackProvider,
  useFeedback,
  vibrationAdapter,
} from "@dixy-ui/react/feedback";

Provider API

PropertyTypeDefault
childrenReactNodeโ€”
enabledboolean | undefinedfalse
adapterFeedbackAdapter | undefinedโ€”

Events and adapters

EventMeaningWeb fallback in ms
selectionA discrete selection changed8
toggleA setting changed10
snapA meaningful detent was reached6
successAn operation completed10, 40, 10
warningAn action needs attention20, 50, 20

A native host can supply its own FeedbackAdapter. The provider requires explicit opt-in; omitting the adapter does nothing. Synchronous throws and rejected adapter promises are isolated from application actions. Emit after a confirmed change, never on focus or every pointer movement. Browser vibration is best effort and cannot reproduce native Core Haptics.