JSPM

@fluentui/react-label

0.0.0-nightly-20220428-0420.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 171608
  • Score
    100M100P100Q155375F
  • License MIT

Fluent UI React Label component

Package Exports

  • @fluentui/react-label

Readme

@fluentui/react-label

React Label components for Fluent UI React

These are not production-ready components and should never be used in product. This space is useful for testing new components whose APIs might change before final release.

Usage

To use the Label component import it from @fluentui/react-label and use it as shown below.

import * as React from 'react';
import { Label } from '@fluentui/react-label';
import { useId } from '@fluentui/react-utilities';

export const labelExample = () => {
  const inputId = useId('firstNameLabel-');

  return (
    <>
      <Label htmlfor={inputId} required strong>
        First Name
      </Label>
      <input id={inputId} />
    </>
  );
};