Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lxsmnsyc/solid-popper

SolidJS bindings for Popper.js
https://github.com/lxsmnsyc/solid-popper

Last synced: about 1 month ago
JSON representation

SolidJS bindings for Popper.js

Awesome Lists containing this project

README

        

# solid-popper

> SolidJS bindings for Popper.js

[![NPM](https://img.shields.io/npm/v/solid-popper.svg)](https://www.npmjs.com/package/solid-popper) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?style=flat-square&logo=codesandbox)](https://codesandbox.io/s/github/LXSMNSYC/solid-popper/tree/main/examples/solid-popper-demo)

## Install

```bash
yarn add @popperjs/core solid-popper
```

## Usage

```jsx
import { createSignal } from 'solid-js';
import usePopper from 'solid-popper';

function Component() {
const [anchor, setAnchor] = createSignal();
const [popper, setPopper] = createSignal();

usePopper(anchor, popper, {
placement: 'auto',
});

return (
<>
Example

This is a tooltip.

>
);
}
```

## Sponsors

![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)

## License

MIT © [lxsmnsyc](https://github.com/lxsmnsyc)