Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    FormField

    Component to enrich a Grapes input.

    View source code
    • Usage
    • Props
    • children
      ReactNode

      The content to display in the FormField

    • label
      string

      The text to display as the label.

    • alertMessage
      string

      The text to display as alert message. If provided, the FormField will act as a React Context provider so that any descendant Grapes `<Input />` can automatically apply `isInvalid` & `aria-invalid`

    • className
      string

      className for the element

    • description
      string

      A description for the field. Provide a hint message to guide user.

    • hint
      ReactNode

      Content to render as additionnal information on the right side of the label

    • htmlFor
      string

      The id of the element which is associated with the control. Use only to break the automatic link between the label and the input

    • infoTipContent
      ReactNode

      The content to display in the tooltip near the label

    • visuallyHideLabel
      boolean

      Whether the label should be visually hidden

      Default: false
    • warningMessage
      string

      The text to display as warn message.