Box
Box is the most abstract component on top of which all other AdaptUI components are built. It uses Ariakit's Role component internally.
Imports
import { Box } from "@adaptui/react-tailwind";
Usage
As
prop
By using the as
prop, you can control which element should be rendered. If you
are using typescript, Box is fully typesafe too.
You can either pass string elements or pass ReactNode
to the as
prop.
Follows all the Ariakits composition rules Arikits Composition Docs
Tailwind CSS example
Card example
API Reference
Prop | Type | Default |
---|---|---|
as | string | React.ElementType | div |
Last updated on July 27, 2022