6.1.4 • Published 3 months ago

@highlight-ui/input v6.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

npm personio.design storybook.personio.design

@highlight-ui/input

Installation

Using npm:

npm install @highlight-ui/input

Using yarn:

yarn add @highlight-ui/input

Using pnpm:

pnpm install @highlight-ui/input

In your (S)CSS file:

@import url('@highlight-ui/input');

Once the package is installed, you can import the library:

import { Input, TextArea } from '@highlight-ui/input';

Performance Tips

The Input component depends on imask.js, which is a relatively heavy dependency. This component's package is tree shakeable, if you do not need the input masking functionalities you can import the TextInput component instead of the Input component.

import { TextInput } from '@highlight-ui/input';

If you only need the masking functionalities of the component, you can import the MaskedInput component:

import { MaskedInput } from '@highlight-ui/input';

Usage

import React from 'react';
import { Input } from '@highlight-ui/input';

export default function InputExample() {
  return <Input name="map" color="input-critical" type="light" />;
}

Props 📜

Input

The InputProps extends the HTMLInputElement types

PropTypeRequiredDefaultDescription
disabledbooleanNofalseDisables the input element
classNamestringNoSets a class name to the component's root element
inputClassNamestringNoAllows providing a custom class name to the input element
outline"default", "warning", "error"NodefaultSets the color of the input's border
focusedbooleanNofalseFocuses the underlying input element
prefixReact.ReactNodeNoRenders the passed element on the left side of the input
prefixVariant"opaque", "transparent"NoApplies the specified style to the prefix element's container
suffixReact.ReactNodeNoRenders the passed element on the right side of the input
containerRefReact.Ref<HTMLDivElement>NoPasses a ref to the input's container element
maskOptionsMaskOptionsNoFunction which accepts locale and returns an imaskjs configuration object used for creating an IMask instance which will control the input element
onMaskAccept(e: MaskEvent) => voidNoSets a callback for when an event is fired on input changes allowed by the mask. This prop only works with maskOptions provided.
onMaskComplete(e: MaskEvent) => voidNoSets a callback for when an event is fired on input completion defined by the mask. This prop only works with maskOptions provided.

TextArea

The TextArea extends the HTMLTextAreaElement types

PropTypeRequiredDefaultDescription
disabledbooleanNofalseDisables the text area element
outline"default", "warning", "error"NodefaultSets the color of the text area's border
containerRefReact.Ref<HTMLDivElement>NoPasses a ref to the input's container element

Contributing 🖌️

Please visit personio.design for usage guidelines and visual examples.

If you're interested in contributing, please visit our contribution page.

6.1.4

3 months ago

6.1.3

5 months ago

6.1.0

7 months ago

6.1.2

7 months ago

6.1.1

7 months ago

6.0.27

7 months ago

6.0.26

7 months ago

6.0.25

8 months ago

6.0.24

8 months ago

6.0.28

7 months ago

6.0.23

8 months ago

6.0.22

8 months ago

6.0.21

8 months ago

6.0.20

8 months ago

6.0.16

9 months ago

6.0.15

9 months ago

6.0.14

10 months ago

6.0.13

10 months ago

6.0.19

9 months ago

6.0.18

9 months ago

6.0.17

9 months ago

6.0.12

10 months ago

6.0.11

10 months ago

6.0.10

10 months ago

6.0.7

10 months ago

6.0.6

10 months ago

6.0.9

10 months ago

6.0.8

10 months ago

6.0.3

10 months ago

6.0.2

10 months ago

6.0.5

10 months ago

6.0.4

10 months ago

6.1.0-r18.0

8 months ago

5.4.23

11 months ago

5.4.24

11 months ago

5.4.21

12 months ago

5.4.22

12 months ago

5.4.20

12 months ago

6.0.1

11 months ago

6.0.0

11 months ago

5.4.19

12 months ago

5.4.18

1 year ago

5.4.16

1 year ago

5.4.17

1 year ago

5.4.14

1 year ago

5.4.15

1 year ago

5.4.9

1 year ago

5.4.8

1 year ago

5.4.7

1 year ago

5.4.12

1 year ago

5.4.13

1 year ago

5.4.10

1 year ago

5.4.11

1 year ago

5.3.3

1 year ago

5.3.2

1 year ago

5.3.1

1 year ago

5.3.0

1 year ago

5.0.25

1 year ago

5.4.6

1 year ago

5.4.5

1 year ago

5.4.4

1 year ago

5.4.3

1 year ago

5.4.2

1 year ago

5.4.1

1 year ago

5.4.0

1 year ago

5.1.9

1 year ago

5.1.8

1 year ago

5.1.7

1 year ago

5.1.6

1 year ago

5.1.5

1 year ago

5.1.4

1 year ago

5.1.3

1 year ago

5.1.2

1 year ago

5.1.1

1 year ago

5.1.0

1 year ago

5.2.2

1 year ago

5.2.1

1 year ago

5.2.0

1 year ago

5.1.12

1 year ago

5.1.11

1 year ago

5.1.10

1 year ago

5.0.21

2 years ago

5.0.23

2 years ago

5.0.19

2 years ago

5.0.16

2 years ago

5.0.17

2 years ago

5.0.18

2 years ago

5.0.0-alpha.1

2 years ago

5.0.9

2 years ago

5.0.8

2 years ago

5.0.7

2 years ago

5.0.6

2 years ago

5.0.5

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

5.0.11

2 years ago

5.0.12

2 years ago

5.0.13

2 years ago

5.0.14

2 years ago

5.0.15

2 years ago

5.0.0-alpha.0

2 years ago

4.1.12

2 years ago

4.1.13

2 years ago

4.1.14

2 years ago

4.1.10

2 years ago

4.1.11

2 years ago

4.1.8

2 years ago

4.1.7

2 years ago

4.1.9

2 years ago

4.1.6

2 years ago

4.1.5

2 years ago

4.1.4

3 years ago

4.1.3

3 years ago

4.1.2

3 years ago

4.1.1

3 years ago

4.1.0

3 years ago

4.0.5

3 years ago

4.0.4

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.12

3 years ago

2.0.11

3 years ago

2.0.7

3 years ago

2.0.9

3 years ago

2.0.10

3 years ago

2.0.8

3 years ago

2.0.5

3 years ago

2.0.6

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.10

3 years ago

2.0.0

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago