ComponentsCommon Components

BaseIconButton

The BaseIconButton component that provides a customizable icon button with ripple effect and theming support.

Usage

import React from 'react';
import { BaseIconButton } from 'react-native-video-toolkit';
import { Heart } from 'lucide-react-native';

export const BaseIconButtonExample = () => {
  /**
   * Alert don't works on web so changed to window alert :P
   */
  return <BaseIconButton IconComponent={Heart} onTap={() => alert('Heart')} />;
};

export default BaseIconButtonExample;

Props

PropTypeDefaultDescription
IconComponentReact.ElementTyperequiredThe icon component to render.
sizenumbertheme.iconSizes.mdThe size of the icon.
colorstringtheme.colors.textThe color of the icon.
onTap() => voidrequiredThe function to call when the button is tapped.

On this page