import { useState } from 'react'
import Br from '../../Br'
import PasswordInput from '../PasswordInput'
import TextInput from '../TextInput'
import { Sandbox } from '@startupjs/docs'

# PasswordInput

PasswordInput provides a text field for entering a password with a button to hide the entered text.
PasswordInput inherits the properties of the [TextInput](/docs/forms/TextInput).

```jsx
import { PasswordInput } from from '@startupjs/ui'
```

## Simple example

```jsx example
const [password, setPassword] = useState()

return (
  <PasswordInput
    value={password}
    onChangeText={setPassword}
  />
)
```

## Disabled

```jsx example
return (
  <PasswordInput
    disabled
    value='Disabled'
  />
)
```

## Sandbox

<Sandbox Component={PasswordInput} block />
