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

@fluentui/react-aria

Package Overview
Dependencies
Maintainers
13
Versions
889
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-aria

React helper to ensure ARIA

  • 0.0.0-nightly-20221019-0421.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
119K
decreased by-3.95%
Maintainers
13
Weekly downloads
 
Created

What is @fluentui/react-aria?

@fluentui/react-aria is a library that provides accessible React components and hooks, following the Fluent UI design system. It focuses on ensuring that components are accessible and adhere to ARIA standards.

What are @fluentui/react-aria's main functionalities?

Button

The useButton hook provides the necessary ARIA attributes and event handlers to make a button accessible.

import { useButton } from '@fluentui/react-aria';

function MyButton(props) {
  let ref = React.useRef();
  let { buttonProps } = useButton(props, ref);

  return (
    <button {...buttonProps} ref={ref}>
      {props.children}
    </button>
  );
}

Checkbox

The useCheckbox hook provides the necessary ARIA attributes and event handlers to make a checkbox accessible.

import { useCheckbox } from '@fluentui/react-aria';

function MyCheckbox(props) {
  let ref = React.useRef();
  let { inputProps } = useCheckbox(props, ref);

  return (
    <label>
      <input {...inputProps} ref={ref} />
      {props.children}
    </label>
  );
}

Dialog

The useDialog hook provides the necessary ARIA attributes and event handlers to make a dialog accessible.

import { useDialog } from '@fluentui/react-aria';

function MyDialog(props) {
  let ref = React.useRef();
  let { dialogProps } = useDialog(props, ref);

  return (
    <div {...dialogProps} ref={ref}>
      {props.children}
    </div>
  );
}

Other packages similar to @fluentui/react-aria

FAQs

Package last updated on 19 Oct 2022

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