Layout
Layouts create a top-level shell for your application.
Examples
Header
Sidebar
Content
import React from 'react';
import ReactDOM from 'react-dom';
import { Layout, Header, Sidebar, Content } from 'furl-components';
ReactDOM.render(
<Layout
sidebar='right'
header='top'
contentSize={[1.0, 1.0, 0.8, 0.85]}
>
<Header outline='bottom'>Header</Header>
<Sidebar outline='left'>Sidebar</Sidebar>
<Content>Content</Content>
</Layout>,
document.getElementById('root')
);
API
Property | Description | Type | Default | ||
---|---|---|---|---|---|
header | layout header position | string/array(string) | 'top' | ||
sidebar | layout sidebar position | string/array(string) | 'left' | ||
contentSize | layout content size | number/array(number) | [1.0, 1.0, 0.75, 0.8] |
Property | Description | Type | Default | ||
---|---|---|---|---|---|
outline | header outline | string | 'none' |
Property | Description | Type | Default | ||
---|---|---|---|---|---|
outline | sidebar outline | string | 'none' |
Notes
- A
Layout
component only accepts children of theHeader
,Sidebar
orContent
component types. Sidebar
will automatically collapse for whatever screen sizecontentSize
is1.0
, providing a menu button to open it up.header
,sidebar
andcontentSize
can either accept a single value or an array of 4 values, specifiying the different values for each screen size.- The value(s) of
header
can be either'top'
or'bottom'
. - The value(s) of
sidebar
can be either'left'
or'right'
. - The value(s) of
contentSize
can be any decimcal value between0.0
and1.0
. - A header’s
outline
can be one of the following:'none'
,'top'
or'bottom'
. - A sidebar’s
outline
can be one of the following:'none'
,'left'
or'right'
.