@pikas-ui/textfield

This package contains a textfield component that can be used in your React application.

Change Log

Requirements

To use this package, you must install the @pikas-ui/styles package.

Installation

You can install this package using npm, yarn, or pnpm.

npm install @pikas-ui/textfield
yarn add @pikas-ui/textfield
pnpm add @pikas-ui/textfield

Usage

Textfield

With the Textfield component, you can create a textfield.

*

Eu est labore ea laborum laborum mollit non minim eu commodo.

import { Textfield } from '@pikas-ui/textfield';

const Example: React.FC = () => {
  return (
    <Textfield
      label="Textfield label"
      description="Eu est labore ea laborum laborum mollit non minim eu commodo."
      required
    />
  );
};

Props

Props extends InputHTMLAttributes<HTMLInputElement>

PropDescriptionTypeDefault
typeThe type of the textfield.TextfieldType"text"
labelThe label of the textfield.string or ReactNode-
boxShadowThe box shadow of the textfield.PikasShadow"inner-md"
borderRadiusThe border radius of the textfield.PikasRadius"md"
paddingThe padding of the textfield.TextfieldPadding"md"
gapThe gap of the textfield.TextfieldGap-
fontSizeThe font size of the textfield.PikasFontSize"em-base"
colorNameThe color of the textfield.PikasColors-
colorHexThe color hex of the textfield.string-
placeholderColorNameThe placeholder color of the textfield.PikasColors"black-light"
placeholderColorHexThe placeholder color hex of the textfield.string-
borderColorNameThe border color of the textfield.PikasColors"transparent"
borderColorHexThe border color hex of the textfield.string-
borderWidthThe border width of the textfield.number0
backgroundColorNameThe background color of the textfield.PikasColors"gray-lightest-1"
backgroundColorHexThe background color hex of the textfield.string-
textErrorThe error text of the textfield.string-
onChangeThe onChange event of the textfield.(e: ChangeEvent<HTMLInputElement>) => void-
defaultValueThe default value of the textfield.string-
autoCompleteThe autoComplete of the textfield.string-
LeftIconThe left icon of the textfield.FC<IconProps>-
RightIconThe right icon of the textfield.FC<IconProps>-
leftChildrenThe left children of the textfield.ReactNode-
rightChildrenThe right children of the textfield.ReactNode-
cssThe css of the textfield.TextfieldCSS-
outlineThe outline of the textfield.booleantrue
descriptionThe description of the textfield.string-
widthThe width of the textfield.string or number"100%"
maxWidthThe max width of the textfield.string or number"100%"
minWidthThe min width of the textfield.string or number-
leftIconColorNameThe left icon color of the textfield.PikasColors-
leftIconColorHexThe left icon color hex of the textfield.string-
rightIconColorNameThe right icon color of the textfield.PikasColors-
rightIconColorHexThe right icon color hex of the textfield.string-
leftIconSizeThe left icon size of the textfield.number-
rightIconSizeThe right icon size of the textfield.number-
requiredThe required of the textfield.booleanfalse
infoAdd a info icon with a tooltip.string-
dataThe data of the textfield.DOMStringMap-

Contributing

This documentation can be edited on GitHub here