Documentation Index
Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
Use this file to discover all available pages before exploring further.
.sensoryFeedback(props: {
feedback: "impact" | "selection" | "success" | "warning" | "error"
| "light" | "medium" | "heavy" | "increase" | "decrease";
trigger: any;
}): Component
The type of haptic feedback to trigger:
"impact" — a single tap
"selection" — a light selection tick
"success" — success confirmation pattern
"warning" — warning alert pattern
"error" — error alert pattern
"light" — light impact
"medium" — medium impact
"heavy" — heavy impact
"increase" — value increase pattern
"decrease" — value decrease pattern
The value to observe. Haptic feedback fires each time this value changes.
Support
Usage
Feedback on toggle
const body = () => {
const [isOn, setIsOn] = useState(false)
return Toggle("Notifications", { isOn, setIsOn })
.sensoryFeedback({ feedback: "selection", trigger: isOn })
}
Success feedback on completion
const body = () => {
const [completed, setCompleted] = useState(false)
return VStack([
Button("Complete", () => setCompleted(true))
]).sensoryFeedback({ feedback: "success", trigger: completed })
}
Impact feedback on tap count
const body = () => {
const [count, setCount] = useState(0)
return Button("Tap me", () => setCount(count + 1))
.sensoryFeedback({ feedback: "impact", trigger: count })
}