4.0.12 • Published 3 months ago

@nice-digital/nds-container v4.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@nice-digital/nds-container

Container component for the NICE Design System

Installation

Install Node, and then:

npm i @nice-digital/nds-container --save

Usage

React

Import the Container component from the package and use within JSX:

import React from "react";
import { Container } from "@nice-digital/nds-container";

<Container>
	...
</Container>

Note: The React component automatically imports the SCSS, so there's no need to import the SCSS directly yourself.

Props

Container
children
  • Type: React.Node | React.Node[] (required)

The content to render inside the container.

className
  • Type: string
  • Default: ""

Additional classes to render on the container element. Useful for margin classes e.g. mt--d.

elementType
  • Type: React.ElementType
  • Default: div

A custom tag type for the container. Useful if the container covers the whole of the page's unique content, i.e. elementType="main".

fullWidth
  • Type: boolean
  • Default: false

An option to override the default max-width of the container ($container-max-width), and set it to 98% of the parent (or viewport's) width.

SCSS

If you're not using React, then import the SCSS directly into your application by:

@forward '@nice-digital/nds-container/scss/container';

HTML

If you're not using React, then include the SCSS as above and use the HTML, for example:

<div class="container">
	...
</div>

<div class="container container--full">
	<p>Full width content here</p>
</div>
4.0.12

3 months ago

4.0.11

3 months ago

4.0.10

3 months ago

4.0.9

3 months ago

4.0.8

3 months ago

4.0.7

4 months ago

4.0.7-alpha.0

4 months ago

4.0.6

10 months ago

4.0.5

12 months ago

4.0.4

1 year ago

4.0.3

1 year ago

4.0.2

1 year ago

4.0.2-alpha.0

1 year ago

4.0.1-alpha.0

1 year ago

3.0.3

1 year ago

4.0.0-alpha.0

1 year ago

3.0.2-alpha.0

2 years ago

3.0.1-alpha.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

2.0.3-alpha.0

2 years ago

2.0.4-alpha.0

2 years ago

2.0.5-alpha.0

2 years ago

2.0.10-alpha.0

2 years ago

2.0.6-alpha.0

2 years ago

2.0.1-alpha.0

2 years ago

2.0.0-alpha.0

2 years ago

2.0.2-alpha.0

2 years ago

1.0.13-alpha.0

2 years ago

2.0.9-alpha.0

2 years ago

2.0.8-alpha.0

2 years ago

3.0.0

2 years ago

2.0.7-alpha.0

2 years ago

2.0.11-alpha.0

2 years ago

1.0.15-alpha.0

2 years ago

1.0.14-alpha.0

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

3 years ago

1.0.7-alpha.0

3 years ago

1.0.4

3 years ago

1.0.6-alpha.0

3 years ago

1.0.5-alpha.0

3 years ago

1.0.4-alpha.0

3 years ago

1.0.3-alpha.0

3 years ago

1.0.2-alpha.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago