Skip to main content

Container

The Container component is used to group content and elements in a section-like layout.

The Container contains 3 sub-components you can use to help you create WordPress settings pages layouts faster, Container.Header, Container.Block, and Container.SettingsField.

Settings

This is a description of the settings page.

Random Block Content

You can pass any content in here.

Performance Settings

Boost speed and performance by storing a copy of your website content, files,and images online so the pages of your website load faster for your visitors.
Performance Settings
Activate the cache to boost your website speed and performance.
Minify your website assets to reduce the size of your website files.

Usage

import { Container } from "@newfold/ui-component-library";

<Container>
<Container.Header
title="Settings"
description="This is a description of the settings page."
/>
<Container.Block separator={true}>
<div>
<Title>Random Block Content</Title>
<p>
Container can pass any content in here.
</p>
</div>
</Container.Block>
<Container.Block>
<Container.SettingsField
title="Performance Settings"
description="Boost speed and performance by storing a copy of your website content,
files, and images online so the pages of your website load faster for your visitors."
>
...Performance settings fields
</Container.SettingsField>
</Container.Block>
</Container>

Container Props

AttributeTypeDescriptionDefault
asstring | The HTML element to render.div
childrennode | The content of this container.-
classNamestring | --

Sub-components

The Container component contains 3 sub-components you can use to help you create WordPress settings pages layouts faster.

Container.Header

The Container.Header component is used to display a title and description for this instance of the container.

import { Container } from "@newfold/ui-component-library";

<Container>
<Container.Header
title="Settings"
description="This is a description of the settings page."
/>
</Container>

Container.Header Props

AttributeTypeDescriptionDefault
asstring | The HTML element to render.div
titlestring | --
descriptionstring | --
childrennode | The content of the header to render after the title and description.-
classNamestring | --

Container.Block

The Container.Block component is used to group content and elements together.

import { Container } from "@newfold/ui-component-library";

<Container>
<Container.Block separator={true}>
<div>
<Title>Random Block Content</Title>
<p>
Container can pass any content in here.
</p>
</div>
</Container.Block>
</Container>

Container.Block Props

AttributeTypeDescriptionDefault
asstring | The HTML element to render.div
childrennode | The content of this block.-
separatorbool | Whether to render a separator after the block.false
idstring | --
classNamestring | --

Container.SettingsField

The Container.SettingsField can be used to generate settings layouts.

import { Container } from "@newfold/ui-component-library";

<Container>
<Container.Block>
<Container.SettingsField
title="Performance Settings"
description="Boost speed and performance by storing a copy of your website content,
files, and images online so the pages of your website load faster for your visitors."
>
...Performance settings fields
</Container.SettingsField>
</Container.Block>
</Container>

Container.SettingsField Props

AttributeTypeDescriptionDefault
asstring | The HTML element to render.div
titlestring | The title of the settings field.-
descriptionstring | The description of the settings field.-
childrennode | The content of this block.-
classNamestring | --

Hello From Root