Icon Button
IconButton renders compact square/circle icon buttons.
Usage
import { IconButton } from '@masumdev/rn-ui';import { Search } from 'lucide-react-native';
export function IconButtonExample() { return ( <IconButton icon={({ color, size }) => <Search color={color} size={size} />} variant="outline" tone="primary" size="md" onPress={() => console.log('Search pressed')} /> );}Props API
| Prop | Type | Default | Description |
|---|---|---|---|
icon | RenderIcon | — | Icon render function or ReactNode element. |
variant | 'filled' | 'outline' | 'ghost' | 'soft' | 'filled' | Button style variant. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Button size dimensions. |
tone | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'danger' | 'info' | 'primary' | Color tone. |
loading | boolean | false | Displays loading spinner. |