Socket
Book a DemoInstallSign in
Socket

@highlight-ui/form-field

Package Overview
Dependencies
Maintainers
10
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@highlight-ui/form-field

This is the FormField and FormFieldView component used in Personio

npmnpm
Version
7.0.23
Version published
Weekly downloads
415
371.59%
Maintainers
10
Weekly downloads
 
Created
Source

npm personio.design storybook.personio.design

@highlight-ui/form-field

Installation

Using npm:

npm install @highlight-ui/form-field

Using yarn:

yarn add @highlight-ui/form-field

Using pnpm:

pnpm install @highlight-ui/form-field

In your (S)CSS file:

@import url('@highlight-ui/form-field');

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

import {
  FormField,
  FormFieldView,
  InputFormField,
  SelectFormField,
  TextAreaFormField,
} from '@highlight-ui/form-field';

Usage

import React, { useState } from 'react';
import { FormField } from '@highlight-ui/form-field';

export default function FormFieldExample() {
  return (
    <FormField
      label="Input Field"
      htmlFor="input-123"
      hintText="Optional Help Text"
    >
      <Input id="input-123" type="text" placeholder="Type something here" />
    </FormField>
  );
}

Props 📜

FormField

PropTypeRequiredDefaultDescription
childrenReact.ReactNodeYesThe content inside the form field
labelstringYesLabel for the input field
horizontalbooleanNofalseWhether to use the horizontal layout of the form field
htmlForstringNoSpecify which HTML element the Label is for
labelTooltipContentTooltipProps['content']NoThe content to be displayed in the tooltip pop-out
labelTooltipMouseOutDelayTooltipProps['mouseOutDelay']NoHow quickly to hide the tooltip
helperTextReact.ReactNodeNoThe text that will be displayed as a secondary label
hintTextstringNoThe grayed out, additional to the helperText information.
validationsIdstringNoThe id of the validation info wrapper
validationsArray<Omit<ValidationMessageProps, 'className'>>NoAn array of objects that represent different validation states

FormFieldView

PropTypeRequiredDefaultDescription
childrenReact.ReactNodeYesThe content inside the form field view
labelstringYesLabel for the field view
horizontalbooleanNofalseWhether to use the horizontal layout of the form field
placeholderstringNo-The placeholder value

InputFormField

The following props build on the FormField props listed above

PropTypeRequiredDefaultDescription
idstringNoThe id applied to the input element
inputPropsOmit<InputProps, 'outline' 'ref'>NoThe InputProps to pass down to the underlying Input component

SelectFormField

The following props build on the FormField props listed above

PropTypeRequiredDefaultDescription
selectPropsOmit<SelectProps<T>, 'outline' 'variant'>YesThe SelectProps to pass down to the underlying Select component
idstringNoThe id applied to the select element

TextAreaFormField

The following props build on the FormField props listed above

PropTypeRequiredDefaultDescription
idstringNoThe id applied to the select element
textAreaPropsOmit<TextAreaProps, 'outline'>NoThe TextAreaProps to pass down to the underlying TextArea component

Contributing 🖌️

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

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

FAQs

Package last updated on 17 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts