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

abaabil.popover

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abaabil.popover

  • 0.0.26
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-85%
Maintainers
0
Weekly downloads
 
Created
Source

Popover Component

npm version npm downloads

The Popover component is a versatile and customizable tooltip-like overlay component built with React. It supports different positions, sizes, and variants, making it suitable for a wide range of use cases.

Usage

import * as React from 'react';
import Popover from './path-to-popover';
import Button from 'abaabil.button';

const App = () => (
  <div>
    <Popover content="This is a popover" position="top" variant="primary" size="df">
      <Button>Hover over me</Button>
    </Popover>
  </div>
);

export default App;

Props

PropTypeDefaultDescription
childrennodenullThe trigger element for the popover.
contentnodenullThe content to display inside the popover.
positionstringtopThe position of the popover relative to the trigger element. Can be top, bottom, left, or right.
variantstringprimaryThe popover variant. Can be primary.
sizestringmdThe size of the popover. Can be cp, md, or sp.
...propsobject{}Additional props to pass to the popover element.

Positions

  • top: Displays the popover above the trigger element.
  • bottom: Displays the popover below the trigger element.
  • left: Displays the popover to the left of the trigger element.
  • right: Displays the popover to the right of the trigger element.

Sizes

  • cp: Small popover size.
  • md: Medium popover size.
  • sp: Large popover size.

Example

import * as React from 'react';
import Popover from './path-to-popover';
import Button from 'abaabil.button';

const Example = () => (
  <div>
    <Popover content="This is a top popover" position="top" variant="primary" size="df">
      <Button>Top Popover</Button>
    </Popover>
    <Popover content="This is a bottom popover" position="bottom" variant="primary" size="sp">
      <Button>Bottom Popover</Button>
    </Popover>
    <Popover content="This is a left popover" position="left" variant="primary" size="cp">
      <Button>Left Popover</Button>
    </Popover>
    <Popover content="This is a right popover" position="right" variant="primary" size="df">
      <Button>Right Popover</Button>
    </Popover>
  </div>
);

export default Example;

This example demonstrates various ways to use the Popover component, showcasing different positions, sizes, and states.

Keywords

FAQs

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