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.
Name | Type | Description | Default |
---|---|---|---|
type | string | The type of the field. | - |
placeholder | string | The placeholder of the field. | - |
maxLength | number | The max length of the field. | - |
minLength | number | The min length of the field. | - |
icon | ReactNode | The icon of the field. | - |
validating | boolean | The validating state of the field. | - |
disabled | boolean | The disabled state of the field. | - |
Field.Wrapper
Field.Wrapper
extends Flex component's props.
Field.Label
Field.Label
extends Text component's props.
Name | Type | Description | Default |
---|---|---|---|
id | string | The htmlFor property of the field label. | - |
size | PrismaneBreakpoints | The size of the field label. | base |
Field.Label
Field.Label
extends Animation and Flex component's props.
Name | Type | Description | Default |
---|---|---|---|
size | PrismaneBreakpoints | The size of the field error. | base |
CSS
Field
Field
extends Flex and Transition components' CSS classes.
Rule | Global Class | Description |
---|---|---|
root | .PrismaneField-root | The 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-icon | The icon container of the field component. |
field | .PrismaneField-field | The field of the field component. |
Field.Wrapper
Field.Wrapper
extends Flex component's CSS classes.
Rule | Global Class | Description |
---|---|---|
root | .PrismaneFieldWrapper-root | The container of the field wrapper component. |
Field.Label
Field.Label
extends Text component's CSS classes.
Rule | Global Class | Description |
---|---|---|
root | .PrismaneFieldLabel-root | The container of the field wrapper component. |
Field.Error
Field.Error
extends Animation and Flex component's CSS classes.
Rule | Global Class | Description |
---|---|---|
root | .PrismaneFieldError-root | The container of the field wrapper component. |