Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-field

Package Overview
Dependencies
Maintainers
0
Versions
663
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-field

Fluent UI Field components

  • 0.0.0-nightly-20241122-0407.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
111K
decreased by-0.85%
Maintainers
0
Weekly downloads
 
Created
Source

@fluentui/react-field

React Field component for Fluent UI React

Description

Field adds a label, validation message, and hint text to a control. Any single form control can be used as the child of the Field.

Usage

To import Field:

import { Field } from '@fluentui/react-components';

Examples

Works with many form controls, for example:

<>
  <Field label="Name">
    <Input />
  </Field>
  <Field label="Description">
    <Textarea />
  </Field>
  <Field label="Size">
    <RadioGroup>
      <Radio label="Small" />
      <Radio label="Medium" />
      <Radio label="Large" />
    </RadioGroup>
  </Field>
</>

Display hint text:

<Field label="Password" hint="Must be at least 8 characters long.">
  <Input type="password" />
</Field>

Display an error message:

<Field label="Re-enter password" validationMessage="Passwords do not match.">
  <Input type="password" />
</Field>

See Fluent UI Storybook for more detailed usage examples.

Alternatively, run Storybook locally with:

  1. yarn start
  2. Select react-field from the list.

Specification

See SPEC.md.

Migration Guide

If you're upgrading to Fluent UI v9 see MIGRATION.md for guidance on updating the Field component.

FAQs

Package last updated on 22 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc