# library-list-component

> List component for React

Latest version **1.0.1** (published 2018-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install library-list-component
pnpm add library-list-component
yarn add library-list-component
bun add library-list-component
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-06-27 |
| First published | 2018-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 376.3 KB |
| Known vulnerabilities | 0 (+22 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | bronsond |

## Links

- npm: https://www.npmjs.com/package/library-list-component
- npm.io page: https://npm.io/package/library-list-component

## Dependencies (2)

- [dompurify](https://npm.io/package/dompurify.md) ^1.0.4
- [classnames](https://npm.io/package/classnames.md) ^2.2.6

## Recent versions

- 1.0.1 (latest) — 2018-06-27
- 1.0.0 — 2018-06-27

## README

# List Component

List component for React

Install and save component as a dependency

```

npm install --save library-list-component

```

Import component into your app

```

import List from 'library-list-component'

```

Create an array of objects with the key being data

```

const listData = [
	{
		data: "Item one",
		content: [
			{
				data: "Sub item one"
			}
		]
	},
	{
		data: "Item two"
	},
	{
		data: "Item three"
	},
	{
		data: "Item four"
	},
	{
		data: "Item five"
	}
]

```

Render the component with the object array we created as well as any other props that are needed

```

render () {
	const listData = [
		{
			data: "Item one",
			content: [
				{
					data: "Sub item one"
				}
			]
		},
		{
			data: "Item two"
		},
		{
			data: "Item three"
		},
		{
			data: "Item four"
		},
		{
			data: "Item five"
		}
	]

	return (
		<ListComponent 
			listData={listData}
			listStyleType="roman"
			listAlign="left"
			listInline={false}
			subListStyleType="default" />
	)
}

```

| Prop             | Values                                 |
| :--------------- | :------------------------------------- |
| listData         | Object                                 |
| listStyleType    | default, circle, decimal, alpha, roman |
| listAlign        | left, right, center                    |
| listInline       | true or false                          |
| subListStyleType | default, circle, decimal, alpha, roman |

---
_Source: https://npm.io/package/library-list-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
