Back to Mantine

Box

apps/mantine.dev/src/pages/core/box.mdx

9.2.1584 B
Original Source

import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';

export default Layout(MDX_DATA.Box);

Usage

Box component is used as a base for all other components. Box supports the following features:

You can use Box as a base for your own components or as a replacement for HTML elements:

tsx
import { Box } from '@mantine/core';

function Demo() {
  return (
    <Box bg="red.5" my="xl" component="a" href="/">
      My component
    </Box>
  );
}