React Native MantineMiscellaneous

Paper

Container with shadow and border radius

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

Usage

import { Paper, Text } from 'react-native-mantine';

// Basic paper
<Paper p="md" shadow="sm" radius="md">
  <Text>Content goes here</Text>
</Paper>

// Paper with border
<Paper p="lg" radius="md" withBorder>
  <Text>Card with border</Text>
</Paper>

// Elevated card
<Paper p="xl" shadow="lg" radius="lg">
  <Text>Elevated card</Text>
</Paper>

Props

PropTypeDefaultDescription
shadow'xs' | 'sm' | 'md' | 'lg' | 'xl'Key of theme.shadows to apply shadow elevation effect
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl""sm"Key of theme.radius or any valid number to set border-radius
pnumber | "xs" | "sm" | "md" | "lg" | "xl"0Padding from theme.spacing (xs, sm, md, lg, xl), or number to set padding in pixels
withBorderbooleanfalseAdds border with theme.colors.gray[3] in light mode and theme.colors.dark[4] in dark mode
childrenReact.ReactNodePaper content
styleViewStyleAdditional styles to apply to the paper container

Source on GitHub · npm