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

@fluentui/react

Package Overview
Dependencies
Maintainers
0
Versions
825
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react

Reusable React components for building web experiences.

  • 8.121.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
62K
decreased by-63.4%
Maintainers
0
Weekly downloads
 
Created

What is @fluentui/react?

@fluentui/react is a collection of robust, reusable, and customizable React components designed to help developers build consistent and accessible user interfaces. It is part of the Fluent UI design system developed by Microsoft.

What are @fluentui/react's main functionalities?

Button

The Button component is used to trigger an action or event, such as submitting a form or saving data. The PrimaryButton is a styled variant that stands out more prominently.

import { PrimaryButton } from '@fluentui/react';

function App() {
  return (
    <PrimaryButton text="Click Me" onClick={() => alert('Button clicked!')} />
  );
}

TextField

The TextField component is used to capture user input in a text format. It can be customized with labels, placeholders, and validation messages.

import { TextField } from '@fluentui/react';

function App() {
  return (
    <TextField label="Enter your name" />
  );
}

Dropdown

The Dropdown component allows users to select an option from a list. It supports various customization options, including multi-select and search functionality.

import { Dropdown } from '@fluentui/react';

const options = [
  { key: 'A', text: 'Option A' },
  { key: 'B', text: 'Option B' },
  { key: 'C', text: 'Option C' }
];

function App() {
  return (
    <Dropdown placeholder="Select an option" options={options} />
  );
}

Modal

The Modal component is used to display content in a layer above the main application. It is useful for dialogs, forms, and other interactive content that requires user attention.

import { Modal, IconButton } from '@fluentui/react';
import { useState } from 'react';

function App() {
  const [isModalOpen, setIsModalOpen] = useState(false);

  return (
    <div>
      <IconButton iconProps={{ iconName: 'Add' }} onClick={() => setIsModalOpen(true)} />
      <Modal isOpen={isModalOpen} onDismiss={() => setIsModalOpen(false)}>
        <div>
          <h2>Modal Title</h2>
          <p>Modal content goes here.</p>
        </div>
      </Modal>
    </div>
  );
}

Other packages similar to @fluentui/react

FAQs

Package last updated on 19 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