Box

Box is a layout primitive which can serve as a wrapper component providing most of the CSS utilities.

Examples

Bordered Container

Upload (Click Me)
Error

Box className

Hover me( I am styled with className )

Overridden Box

As a section
As a spanAs italics element

Mockup Component

JH
Jimi Hendrix
Jimi Hendrix

Box Override API

This is styled with overrides API

Box props

NameTypeDefaultDescription
$as
string
Component to replace the default div container
children
react node
Visible label.
className
string
Utility class names to be provided to Box
overrides
custom
Lets you customize all aspects of the component.

You can check the implementation of the component for more details.

Box exports

You can import this module like so:

import {Box} from 'spaceweb/box'

It exports the following components or utility functions:

  • Box