# @novem-ui/input

> input components from novem-ui

Latest version **0.0.2-alpha.5** (published 2022-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @novem-ui/input
pnpm add @novem-ui/input
yarn add @novem-ui/input
bun add @novem-ui/input
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2-alpha.5 |
| Published | 2022-01-18 |
| First published | 2022-01-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 105 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Leonel Vieyra |
| Maintainers | leonelv |

## Links

- npm: https://www.npmjs.com/package/@novem-ui/input
- Repository: https://github.com/jdrets/novem-ui
- Homepage: https://github.com/jdrets/novem-ui/tree/main/packages/input#readme
- Issues: https://github.com/jdrets/novem-ui/issues
- npm.io page: https://npm.io/package/@novem-ui/input

## Dependencies (6)

- [nanoid](https://npm.io/package/nanoid.md) ^3.1.30
- [fast-copy](https://npm.io/package/fast-copy.md) ^2.1.1
- [@novem-ui/base](https://npm.io/package/@novem-ui/base.md) ^0.0.2-alpha.5
- [@novem-ui/text](https://npm.io/package/@novem-ui/text.md) ^0.0.2-alpha.5
- [@novem-ui/badge](https://npm.io/package/@novem-ui/badge.md) ^0.0.2-alpha.5
- [react-fast-compare](https://npm.io/package/react-fast-compare.md) ^3.2.0

## Recent versions

- 0.0.2-alpha.5 (latest) — 2022-01-18
- 0.0.2-alpha.4 — 2022-01-18
- 0.0.2-alpha.3 — 2022-01-18
- 0.0.2-alpha.2 — 2022-01-18
- 0.0.2-alpha.1 — 2022-01-18
- 0.0.2-alpha.0 — 2022-01-18

## README

# @novem-ui/input

## Usage

### `<Input />`

The component has the following props, plus [SpacingProps](../base/src/spacing/README.md) and all the expected props from the native <input />:

- `baseColor` (Optional): It can be any color from the theme, uses `orange` by default.
- `error` (Optional): It can be a `boolean`, a `string` or a `new Error`, just changes the color to red, doesnt show a message.
- `valid` (Optional): `boolean`.

```tsx
import { Input, ThemeProvider } from '@novem-ui/core'
// or
import { Input } from '@novem-ui/input'
import { ThemeProvider } from '@novem-ui/theme'

function App() {
  return (
    <ThemeProvider>
      <Input type="number" />
    </ThemeProvider>
  )
}
```

### `<TextField />`

The component has the following props, plus [SpacingProps](../base/src/spacing/README.md) and all the expected props from the native <input />:

- `baseColor` (Optional): It can be any color from the theme, uses `orange` by default.
- `error` (Optional): It can be a `boolean`, a `string` or a `new Error`.
- `valid` (Optional): `boolean`
- `label` (Optional): A string show as a label tied to the input.
- `helper` (Optional): A string show as a helper.
- `count` (Optional) A boolean to enable character count.
- `readOnly` (Optional) A boolean to set the input as read only (style is different from disabled).

```tsx
import { TextField, ThemeProvider } from '@novem-ui/core'
// or
import { TextField } from '@novem-ui/input'
import { ThemeProvider } from '@novem-ui/theme'

function App() {
  return (
    <ThemeProvider>
      <Textfield value="A value" helper="Some helper text" />
    </ThemeProvider>
  )
}
```

### `<Dropdown />`

The component has the following props, plus [SpacingProps](../base/src/spacing/README.md) and all the expected props from the native <input />:

- `baseColor` (Optional): It can be any color from the theme, uses `orange` by default.
- `error` (Optional): It can be a `boolean`, a `string` or a `new Error`.
- `label` (Optional): A string show as a label tied to the input.
- `helper` (Optional): A string show as a helper.
- `readOnly` (Optional) A boolean to set the input as read only (style is different from disabled).

```tsx
import { Dropdown, Option, ThemeProvider } from '@novem-ui/core'
// or
import { Dropdown, Option } from '@novem-ui/input'
import { ThemeProvider } from '@novem-ui/theme'

function App() {
  return (
    <ThemeProvider>
        <Dropdown value="A value" helper="Some helper text">
          <Option value="1">
            Option 1
          </Option>
          <Option value="2">
            Option 2
          </Option>
        </Dropdown>
    </ThemeProvider>
  )
}
```

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