Absolute
Absolute is component that is positioned absolute
.
It renders a <Box>
component with the following additional CSS defaults:
Defaults
Those defaults are added on top of the <Box>
defaults.
{
position: absolute
}
Props
Property | Value | Description |
---|---|---|
top | (length) | CSS top property |
right | (length) | CSS right property |
bottom | (length) | CSS bottom property |
left | (length) | CSS left property |
Shortcuts | ||
fixed | Use position: fixed |
In addition to those props, Absolute also supports all the other <Box>
props.
Example
import { Absolute } from 'kilvin'
const FixedTopLeft = (
<Absolute
fixed
height={100}
width={100}
left={0}
top={0}
extend={{ backgroundColor: 'red' }}>
I am a 100px sized box fixed in the top-left corner
</Absolute>
)