Develop ultra fast with Prismane 🎉

Field API

Learn about the Field component's props and CSS classes.

Import

import {
  FieldProps,
  FieldAddonProps,
  FieldErrorProps,
  FieldLabelProps,
  FieldWrapperProps,
} from "@prismane/core";

Props

Field

Field extends Flex and Transition and PrismaneFieldComponent components' props.

NameTypeDescriptionDefault
typestringThe type of the field.-
placeholderstringThe placeholder of the field.-
maxLengthnumberThe max length of the field.-
minLengthnumberThe min length of the field.-
iconReactNodeThe icon of the field.-
validatingbooleanThe validating state of the field.-
disabledbooleanThe disabled state of the field.-

Field.Wrapper

Field.Wrapper extends Flex component's props.

Field.Label

Field.Label extends Text component's props.

NameTypeDescriptionDefault
idstringThe htmlFor property of the field label.-
sizePrismaneBreakpoints The size of the field label.base

Field.Label

Field.Label extends Animation and Flex component's props.

NameTypeDescriptionDefault
sizePrismaneBreakpoints The size of the field error.base

CSS

Field

Field extends Flex and Transition components' CSS classes.

RuleGlobal ClassDescription
root.PrismaneField-rootThe container of the field component.
root.PrismaneField-root-{variant}The container of the field component based on it's variant.
root.PrismaneField-root-{size}The container of the field component based on it's size.
icon.PrismaneField-iconThe icon container of the field component.
field.PrismaneField-fieldThe field of the field component.

Field.Wrapper

Field.Wrapper extends Flex component's CSS classes.

RuleGlobal ClassDescription
root.PrismaneFieldWrapper-rootThe container of the field wrapper component.

Field.Label

Field.Label extends Text component's CSS classes.

RuleGlobal ClassDescription
root.PrismaneFieldLabel-rootThe container of the field wrapper component.

Field.Error

Field.Error extends Animation and Flex component's CSS classes.

RuleGlobal ClassDescription
root.PrismaneFieldError-rootThe container of the field wrapper component.