Skip to main content
Reakit
DocumentationNewsletter
GitHub
GitHub
Reakit is featured on Product Hunt!

Box

Box is the most abstract component on top of which all other Reakit components are built. By default, it renders a div element.

#Installation

npm install reakit

Learn more in Get started.

#Usage

Box
import { Box } from "reakit/Box";

function Example() {
  return <Box>Box</Box>;
}

#as prop

Learn more about the as prop in Composition.

import { Box } from "reakit/Box";

function Example() {
  return <Box as="button">Button</Box>;
}

#Render props

Learn more about render props in Composition.

import { Box } from "reakit/Box";

function Example() {
  return <Box>{props => <button {...props}>Button</button>}</Box>;
}

#Composition

  • Box is used by all Reakit components.

Learn more in Composition.

#Props

#Box

No props to show