Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.08 KB

Absolute.md

File metadata and controls

47 lines (36 loc) · 1.08 KB

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>
)