Components
- Accordion
- Action Sheet
- Alert Dialog
- Alert
- Audio Player
- Audio Recorder
- Audio Waveform
- Avatar
- AvoidKeyboard
- Badge
- BottomSheet
- Button
- Camera Preview
- Camera
- Card
- Carousel
- Checkbox
- Collapsible
- Color Picker
- Combobox
- Date Picker
- File Picker
- Gallery
- Hello Wave
- Icon
- Image
- Input OTP
- Input
- Link
- MediaPicker
- Mode Toggle
- Onboarding
- ParallaxScrollView
- Picker
- Popover
- Progress
- Radio
- ScrollView
- SearchBar
- Separator
- Share
- Sheet
- Skeleton
- Spinner
- Switch
- Table
- Tabs
- Text
- Toast
- Toggle
- Video
- View
Installation
pnpm dlx bna-ui add hello-wave
Usage
import { HelloWave } from '@/components/ui/hello-wave';<HelloWave /><HelloWave size='lg' /><HelloWave size='sm'>🙋♀️</HelloWave>Examples
Default
API Reference
HelloWave
An animated component that displays a waving hand emoji with rotation animation and customizable sizes.
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'md' | Controls the size of the emoji and animation scale. |
children | React.ReactNode | '👋' | Content to animate - typically an emoji string. |
Size Variants
The component includes three predefined size variants:
| Size | Font Size | Line Height | Use Case |
|---|---|---|---|
sm | 20px | 24px | Inline text, compact spaces |
md | 28px | 32px | Default size, most contexts |
lg | 36px | 40px | Headers, prominent display |
Animation Details
- Duration: 150ms for each rotation phase
- Rotation Range: 0° to 25° and back to 0°
- Repetitions: 4 complete wave cycles
- Timing: Runs automatically on component mount
- Easing: Uses default timing function for smooth animation
Customization
Custom Content
You can pass any content as children, not just the default wave emoji:
<HelloWave>🙋♀️</HelloWave>
<HelloWave>✨</HelloWave>
<HelloWave size="lg">🎉</HelloWave>Custom Components
For more complex customization, you can pass React components:
<HelloWave>
<CustomIcon name='wave' />
</HelloWave>Styling
The component uses a centered container layout. For additional styling, wrap the component:
<View style={{ margin: 16 }}>
<HelloWave size='lg' />
</View>Technical Notes
- Uses
react-native-reanimatedfor smooth 60fps animations - Animation runs on the UI thread for better performance
- Automatically starts animation when component mounts
- Uses
useSharedValueanduseAnimatedStylefor optimal performance - Size variants include margin adjustments for proper vertical alignment
- Supports both string content and React components as children
Accessibility
The HelloWave component:
- Uses semantic emoji that screen readers can interpret
- Maintains proper text sizing for accessibility
- Works with system accessibility settings
- Animation doesn't interfere with screen reader functionality
- Proper font sizing scales with system text size preferences