Skip to content

Icon Button

IconButton renders compact square/circle icon buttons.

Usage

IconButtonExample.tsx
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

PropTypeDefaultDescription
iconRenderIconIcon 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.
loadingbooleanfalseDisplays loading spinner.