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
Layoutcomponent only accepts children of theHeader,SidebarorContentcomponent types. Sidebarwill automatically collapse for whatever screen sizecontentSizeis1.0, providing a menu button to open it up.header,sidebarandcontentSizecan either accept a single value or an array of 4 values, specifiying the different values for each screen size.- The value(s) of
headercan be either'top'or'bottom'. - The value(s) of
sidebarcan be either'left'or'right'. - The value(s) of
contentSizecan be any decimcal value between0.0and1.0. - A header’s
outlinecan be one of the following:'none','top'or'bottom'. - A sidebar’s
outlinecan be one of the following:'none','left'or'right'.
