4.0.12 • Published 2 months ago

@nice-digital/nds-column-list v4.0.12

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

@nice-digital/nds-column-list

Column List component for the NICE Design System

Installation

Install Node, and then:

npm i @nice-digital/nds-column-list --save

Usage

React

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

import React from "react";
import { ColumnList } from "@nice-digital/nds-column-list";

<ColumnList>
	<li>Item one</li>
	<li>Item two</li>
	<li>Item three</li>
</ColumnList>

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

Props

plain
  • Type: boolean (default: false)

Whether to render a plain list (as opposed to a boxed one)

<ColumnList plain>
	<li>Item one</li>
	<li>Item two</li>
	<li>Item three</li>
</ColumnList>
columns
  • Type: number (default: 3)

The maximum number of columns to render. The only permitted values are 2 or 3.

<ColumnList columns={2}>
	<li>Item one</li>
	<li>Item two</li>
	<li>Item three</li>
</ColumnList>
children
  • Type: React.ReactNode

As the ColumnList component renders an ol element, it must have at least one <li> child.

<ColumnList>
	<li>Item one</li>
	<li>Item two</li>
	<li>Item three</li>
</ColumnList>
className
  • Type: string

Any additional className will be merged on to the containing <ol> element.

SCSS

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

@forward '@nice-digital/nds-column-list/scss/column-list';

HTML

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

Standard variant (3 columns, boxed layout)

<ol class="column-list column-list--boxed">
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
  <li>Five</li>
  <li>Six</li>
</ol>

Alternative variant (2 columns, plain layout)

<ol class="column-list column-list--plain column-list--two-columns">
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
  <li>Five</li>
  <li>Six</li>
</ol>
4.0.12

2 months ago

4.0.11

2 months ago

4.0.9

2 months ago

4.0.10

2 months ago

4.0.8

3 months ago

4.0.7

3 months ago

4.0.7-alpha.0

4 months ago

4.0.6

10 months ago

4.0.5

11 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

1.3.5-alpha.0

2 years ago

2.0.10-alpha.0

2 years ago

2.0.6-alpha.0

2 years ago

1.3.2

2 years ago

1.3.4-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

2.0.9-alpha.0

2 years ago

2.0.8-alpha.0

2 years ago

1.3.3-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

2.0.12-alpha.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.3.0-alpha.0

2 years ago

1.2.0-alpha.0

2 years ago

1.1.0

2 years ago

1.0.2-alpha.0

2 years ago

1.0.1-alpha.0

2 years ago