Looking for Reakit's successor?Visit Ariakit
Skip to main content
Reakit
DocumentationNewsletter
GitHub
GitHub

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

Powered by Vercel

Released under the MIT License

Copyright © 2017-2023 Diego Haz