# @zlab-de/zel-react

> React Components for Zeppelin Element Library

Latest version **2.0.9** (published 2020-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zlab-de/zel-react
pnpm add @zlab-de/zel-react
yarn add @zlab-de/zel-react
bun add @zlab-de/zel-react
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.9 |
| Published | 2020-12-29 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8.0.0 |
| Dependencies | 3 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alyssa Butler for Zeppelin GmbH |
| Maintainers | cabutler10, adjeiessel |
| Keywords | react, react-component, zeppelin, ZLab |

## Links

- npm: https://www.npmjs.com/package/@zlab-de/zel-react
- Repository: https://github.com/zepdev/zeppelin-element-library-react
- Homepage: https://github.com/zepdev/zeppelin-element-library-react#readme
- Issues: https://github.com/zepdev/zeppelin-element-library-react/issues
- npm.io page: https://npm.io/package/@zlab-de/zel-react

## Dependencies (3)

- [clsx](https://npm.io/package/clsx.md) ^1.1.1
- [downshift](https://npm.io/package/downshift.md) ^6.0.6
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.12.5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.9 (latest) — 2020-12-29
- 2.0.8 — 2020-12-29
- 2.0.7 — 2020-12-29
- 2.0.6 — 2020-12-18
- 2.0.5 — 2020-12-17
- 2.0.4 — 2020-12-17
- 2.0.3 — 2020-11-11
- 2.0.2 — 2020-11-06
- 2.0.1 — 2020-11-06
- 2.0.0 — 2020-11-06
- 1.0.32 — 2020-07-07
- 1.0.31 — 2020-07-07
- 1.0.30 — 2020-05-20
- 1.0.29 — 2020-04-02
- 1.0.28 — 2020-04-02
- … 48 more at https://npm.io/package/@zlab-de/zel-react/versions

## README

# A React Component and Icon Library using Zeppelin Element Library

Please see (Zeppelin Design System)[https://live-zds.zepdev.net/] for more detailed information.

install

```
yarn add @zlab-de/zel-react
```

## Getting Started: Components

This library requires the import of **\*zel.css** for apply all styles from the Zeppelin Element Library.

```
// MyComponent.jsx
import React from 'react'
import Button from '@zlab-de/zel-react/Button'

function MyComponent(){
    return(
        <div>
            <Button color="primary">Click Me!</Button>
        </div>
    )
}

export default MyComponent

// App.js
import React, { Component } from 'react';
import "@zlab-de/zel-react/zel.css"
import MyComponent from "./MyComponent"

class App extends Component {
  render() {
    return (
      <MyComponent />
    );
  }
}

export default App;
```

## guidelines.json from Zeppelin Element Library

This repository also have a **guidelines.json** file available for you to help with styling. This file contains the following information (see the guidelines section for more information); colors, spacing, and typography specifications. Its intended use if for users using a CSS-in-JS solution to be able to call colors and spacing easier.

Example with React-JSS Theming

```
import React from 'react'
import withStyles, {ThemeProvider} from 'react-jss'
import theme from '@zlab-de/zel-react/guidelines.json'

const styles = theme => ({
  div: {
    marginBottom: `${ theme.spacing.component.xxl.rem }rem`,
    color: theme.colors.primary.indigoBlue.hex,
  },
})

function MyComponent(){
    return(
        <div className={classes.div}>
            i'm a component
        </div>
    )
}

export default withStyles(styles)(MyComponent)

const App = () => (
  <ThemeProvider theme={theme}>
    <StyledButton>I am a button with green background</StyledButton>
  </ThemeProvider>
)
```

## Props

Any alternative props that you wish to pass to a component (ie inline styles) will always be passed to the outer element of that component. For example, see the code for Tag below.

```
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import ZepiconsClose from '@zlab-de/zel-react-icons/ZepiconsClose';

const Tag = ({ className: classNameProp, children, onClose, ...other }) => {
  return (
    <span className={clsx(classNameProp, 'zep-tag')} {...other}>
      {children}
      <button onClose={onClose} aria-label="close" className="zep-tag__button">
        <ZepiconsClose className="zep-tag__icons" />
      </button>
    </span>
  );
};

Tag.propTypes = {
  className: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
  children: PropTypes.string
};

export default Tag;
```

## Build files

This project uses the build files from Material UI (../../babel.config.js). To build this package successfully, you must first clone the Material UI repository and then add this package into @material-ui/packages/.

Note if we remove Downshift, please update the rollup file. We had to change ForwardRef to isForwardRef.

Publish TO NPM from build folder after running yarn build

---
_Source: https://npm.io/package/@zlab-de/zel-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
