Skip to main content

Field API Overview

Initialization

import { Field, Text } from "@svar-ui/react-core";

// the Field control contains another control and provides a label for it
// the Field control automatically generates an id for the inner control (unless the control already has one)
<Field label="Text">
<Text />
</Field>
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.

Field Properties

errorOptional. Defines whether error styling is applied to the control's label
labelOptional. Sets a label for the control inside a field
positionOptional. Sets the position of a label relative to the control
requiredOptional. Marks a field as required
typeOptional. Sets the control's type for correct positioning of a left-side label
widthOptional. Sets the width needed for a field to nest a control