🚀 DAY 3 OF LAUNCH WEEK:Announcing Bun and vlt Support in Socket.Learn more
Socket
Book a DemoInstallSign in
Socket

@fluentui/react-positioning

Package Overview
Dependencies
Maintainers
14
Versions
1197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-positioning

A react wrapper around Popper.js for Fluent UI

Source
npmnpm
Version
0.0.0-nightly-20221111-0422.1
Version published
Weekly downloads
209K
-4.9%
Maintainers
14
Weekly downloads
 
Created
Source

@fluentui/react-positioning

A react hook wrapper around Popper.js for Fluent UI.

Usage

import React from 'react';
import { usePopper } from '@fluentui/react-positioning';

function PopupExample: React.FC = ({ children }) => {
  const {targetRef, containerRef} = usePopper();
  const [open, setOpen] = React.useState(false);

  const onClick = () => setOpen(s => !s);
  return (
    <>
      <button ref={targetRef} onClick={onClick}> Toggle popup </button>
      { open && <div ref={containerRef}>{children}</div> }
    </>
  )
}

FAQs

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