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

@radix-ui/react-portal

Package Overview
Dependencies
Maintainers
8
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-portal

  • 0.1.4-rc.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created

What is @radix-ui/react-portal?

The @radix-ui/react-portal package is a React component library that allows you to render components in a different part of the DOM than their parent components. This is particularly useful for rendering modals, tooltips, and other floating elements that need to break out of the normal document flow to avoid issues with overflow, z-index, and CSS inheritance.

What are @radix-ui/react-portal's main functionalities?

Rendering children in a portal

This feature allows you to render a React component or any JSX outside of its parent component's DOM hierarchy. The code sample demonstrates how to use the Portal component to render a div element at the end of the document body.

{"import { Portal } from '@radix-ui/react-portal';\n\nconst MyComponent = () => (\n  <Portal>\n    <div>\n      This will be rendered outside the parent DOM hierarchy.\n    </div>\n  </Portal>\n);"}

Other packages similar to @radix-ui/react-portal

FAQs

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