IconButton consists of the Button component. It is generally used to make an Icon pressable.
const Example = () => {
return <IconButton variant="solid" icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} />;
};
const Example = () => {
return <IconButton variant="solid" icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} />;
};
const Example = () => {
return <IconButton variant="solid" icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} />;
};
IconButton implements
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
The icon to be used. Refer to the Icon section of the docs for the available icon options.
NativeBase ships with a default theme for each component. Check out the default theme of the iconButton
.
Info:
We can easily extend the iconButton component theme using extendTheme function as described in the documentation .Use accessibilityLabel for labelling icon buttons to make sure it's announced by screen reader devices.
IconButton has a
role set to
.