# mui-passfather

> mui-passfather is material-ui text field component allowing generate strong password or random string.

Latest version **2.0.0-beta.5** (published 2020-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install mui-passfather
pnpm add mui-passfather
yarn add mui-passfather
bun add mui-passfather
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0-beta.5 |
| Published | 2020-09-15 |
| First published | 2019-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Evgeny Vyushin |
| Maintainers | vyushin |
| Keywords | material-ui, react, react-component, passfather, password, password-generator |

## Links

- npm: https://www.npmjs.com/package/mui-passfather
- Repository: https://github.com/vyushin/mui-passfather
- Issues: https://github.com/vyushin/mui-passfather/issues
- npm.io page: https://npm.io/package/mui-passfather

## Dependencies (1)

- [passfather](https://npm.io/package/passfather.md) ^2.0.0

## 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.0-beta.5 (latest) — 2020-09-15
- 2.0.0-beta.4 — 2020-09-15
- 2.0.0-beta.3 — 2020-09-15
- 2.0.0-beta.2 — 2020-09-15
- 2.0.0-beta.1 — 2020-09-15
- 2.0.0-beta.0 — 2020-09-15
- 1.1.1 — 2020-05-03
- 1.1.0 — 2020-05-03
- 1.0.4 — 2020-04-27
- 1.0.3 — 2020-04-26
- 1.0.2 — 2020-04-26
- 1.0.1 — 2019-12-15

## README

# mui-passfather
[![version](https://img.shields.io/npm/v/mui-passfather.svg?style=flat-square)](https://www.npmjs.com/package/mui-passfather)
[![license](https://img.shields.io/github/license/vyushin/mui-passfather.svg?style=flat-square)](https://github.com/vyushin/mui-passfather/blob/master/LICENSE)

**mui-passfather** is [material-ui](https://material-ui.com/) text field component allowing generate strong password or random string.<br/>
To generate random string it uses [passfather](https://www.npmjs.com/package/passfather).

![mui-passfather demo gif](https://user-images.githubusercontent.com/8006957/80896930-44ac2100-8cfc-11ea-8338-93b34ede417e.gif)

## Installation

###### NPM
`npm install --save mui-passfather`

###### Yarn
`yarn add mui-passfather`

## Example
[![Edit mui-passfather](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/mui-passfather-s8jhj)
```jsx harmony
// Import react and other, you know...
import MuiPassfather from 'mui-passfather';

const App = () => {
  return (
    <MuiPassfather
      TextFieldProps={{
        type: 'text',
        variant: 'outlined',
        label: 'MUI Passfather',
      }}
      PassfatherOptions={{
        symbols: false,
        length: 10,
      }}
    />
  );
};
```

Full example is located inside [example](https://github.com/vyushin/mui-passfather/blob/master/example) directory.

## Properties

|Name|Type|Default|Description
|---|---|---|---
|TextFieldProps|object|`{}`|Props applied to the [TextField](https://material-ui.com/api/text-field/#textfield-api). component.
|PassfatherOptions|object|`{}`|Passfather [options](https://www.npmjs.com/package/passfather#options).
|VisibilityButtonProps,<br/>CopyToClipboardButtonProps,<br/>GenerateButtonProps|object|`{}`|Props applied to the [IconButton](https://material-ui.com/ru/api/icon-button/#iconbutton-api). component.
|AutorenewIconProps,<br/>VisibilityIconProps,<br/>VisibilityOffIconProps<br/>FileCopyOutlinedIconProps|object|`{}`|Props applied to the [Icon](https://material-ui.com/ru/api/icon/#icon-api). component.
|value|any|`''`|The value.
|generateKey|number|`0`|The key to generate password programmatically. Pass `Date.now()` every time when needs generate new password programmatically.
|hideGenerateButton|boolean|`false`|Hides generate button.
|hideVisibilityButton|boolean|`false`|Hides visibility button.
|hideCopyToClipboardButton|boolean|`false`|Hides copy to clipboard button button.
|disableGenerateButtonDuration|boolean|`false`|Disable generate button animation.
|onGenerate|function| |Fires when password generated
|onChange|function| |Fires when the value change
|onCopyToClipboard|function| |Fires by press on copy to clipboard button
|onCopyToClipboardFailed|function| |Fires if cope to clipboard is failed
|onToggleVisibility|function| |Fires when visibility changed
|renderVisibilityButton|function ({ isVisible, VisibilityButtonProps, VisibilityIconProps, VisibilityOffIconProps, handleToggleVisibility }) => ReactNode|null|Render custom visibility button
|renderCopyToClipboardButton|function ({ copiedValue, CopyToClipboardButtonProps, FileCopyOutlinedIconProps, handleCopyToClipboard }) => ReactNode|null|Render custom copy to clipboard button
|renderGenerateButton|function ({ handleGenerate, GenerateButtonProps, AutorenewIconProps }) => ReactNode|null|Render custom generate button
## Contributing
See [contributing](https://github.com/vyushin/mui-passfather/blob/master/CONTRIBUTING.md) guideline.

## License
[MIT LICENSE](https://github.com/vyushin/mui-passfather/blob/master/LICENSE)

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