• /
  • Log in
  • Start now

LayoutItem

Child element of the <Layout> component.

By default uses the main type, to span the full width of the Layout area. Split left and split right provide a fixed left/right area. Layout only supports one type of each.

Usage

import { LayoutItem } from 'nr1'

Props

childrenrequirednode

Content to display inside the child item.

classNamestring

Appends class names to the component.

sizeTypeenum
DEFAULT
LayoutItem.SIZE_TYPE.MEDIUM

Determines the width of the layout item. We recommend you use the small size for navigation purposes (ex. sidebars) and the medium size for showing contextualized information (ex. activity stream).

Size type only works on SPLIT_LEFT and SPLIT_RIGHT items.

<One of
LayoutItem.SIZE_TYPE.MEDIUM,
LayoutItem.SIZE_TYPE.SMALL,
>
styleobject

Inline style for custom styling.

typeenum
DEFAULT
LayoutItem.TYPE.MAIN

Type can be:

  • Main — Used to place the main content on each view. It spans the full width of the layout area.
  • Split left — Render as a fixed area on the left of the layout.
  • Split right — Render as a fixed area on the right of the layout.
<One of
LayoutItem.TYPE.MAIN,
LayoutItem.TYPE.SPLIT_LEFT,
LayoutItem.TYPE.SPLIT_RIGHT,
>

Methods

LayoutItem.render

function () => undefined
Edit this pageCreate an issue
Copyright © 2021 New Relic Inc.

This site uses cookies 🍪

We use cookies and other similar technologies ("Cookies") on our websites and services to enhance your experience and to provide you with relevant content. By using our websites and services you are agreeing to the use of cookies. You can read more here. If you consent to our cookies, please click Yes.