SoundButton
SoundButton adds sound and haptic feedback to a button.
Source
LLM docs
Package
npm install @plocks/mediaExamples
2
Properties
61
Basics
SoundButton adds sound and haptic feedback to a button.
Loading demo…
import { SoundButton, SoundProvider } from '@plocks/media';
export function Demo() {
return (
<SoundProvider enableAudioMode={false}>
<SoundButton title="Tap for feedback" enableSoundFeedback={false} onPress={() => {}} />
</SoundProvider>
);
}Variants
Compare Button-style variants while audio feedback is disabled for the preview.
Loading demo…
import { Column } from '@plocks/ui';
import { SoundButton, SoundProvider } from '@plocks/media';
const variants = ['default', 'filled', 'light', 'outline', 'ghost'] as const;
export function Demo() {
return (
<SoundProvider enableAudioMode={false}>
<Column gap="sm" align="flex-start">
{variants.map(variant => (
<SoundButton key={variant} variant={variant} title={`${variant} action`} enableSoundFeedback={false} onPress={() => {}} />
))}
</Column>
</SoundProvider>
);
}React Native design for iOS, Android, and Web.
Quick Links
Resources