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

@fluentui/react-portal

Package Overview
Dependencies
Maintainers
12
Versions
902
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-portal

A utility component that creates portals compatible with Fluent UI

  • 9.0.0-alpha.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
104K
decreased by-3.16%
Maintainers
12
Weekly downloads
 
Created
Source

@fluentui/react-portal

React Portal 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.

This package contains the Portal component, which allow consumers to render React portals with Fluent styling and RTL awareness.

Usage

Portal

Portal can be used as standalone with any part of a Fluent app. The component should be under a FluentProvider in the tree to make sure that proper theming and RTL handling is available.

By default Portal will render content to document body

<FluentProvider>
  <Portal>Content rendered by default to Fluent's document.body</Portal>
</FluentProvider>

The mount location of the portal can be customized

const node = document.getElementById('customNode');

<Portal mountNode={node}>Render to a custom node in DOM</Portal>;

Styling

Portal renders React children directly to the default/configured DOM node. Therefore styling should be applied to the children by users directly.

FAQs

Package last updated on 27 Apr 2021

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