React Native MantineData display

ThemeIcon

Icon with themed background

Import: import { ThemeIcon } from 'react-native-mantine';

Usage

import { ThemeIcon, Icon } from 'react-native-mantine';

// Filled variant (default)
<ThemeIcon color="blue" size="lg">
  <Icon name="heart" size={20} color="white" />
</ThemeIcon>

// Light variant
<ThemeIcon color="red" variant="light" size="md">
  ❤️
</ThemeIcon>

// Gradient variant
<ThemeIcon
  variant="gradient"
  gradient={{ from: 'blue', to: 'cyan', deg: 45 }}
  size="xl"
>
  📧
</ThemeIcon>

Props

PropTypeDefaultDescription
children (required)React.ReactNodeIcon component or element to display
colorMantineColor"blue"Key of theme.colors to apply color
variant'filled' | 'light' | 'gradient' | 'outline'"filled"Controls appearance - filled (solid background), light (subtle background), gradient (gradient background), or outline (border only)
gradientMantineGradient{ from: "blue", to: "cyan", deg: 45 }Controls gradient settings in gradient variant only - object with from, to, and deg properties
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | number"md"Predefined size or number to set width and height in pixels
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl""sm"Key of theme.radius or number to set border-radius in pixels
styleViewStyleAdditional styles to apply to the icon container

Source on GitHub · npm