All Projects β†’ floating-ui β†’ svelte-popper

floating-ui / svelte-popper

Licence: other
πŸΏπŸ”—Official Svelte wrapper for Popper - the positioning library

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to svelte-popper

floating-ui
A low-level toolkit to create floating elements. Tooltips, popovers, dropdowns, and more
Stars: ✭ 23,485 (+86881.48%)
Mutual labels:  popovers, positioning
Popper Core
🍿 JavaScript positioning library for tooltips, popovers, dropdowns, and more
Stars: ✭ 18,903 (+69911.11%)
Mutual labels:  popovers, positioning
ember-popper
Popper.js for Ember
Stars: ✭ 38 (+40.74%)
Mutual labels:  tooltips, popovers
UIElements
Various scripts related to Unity UI Toolkit (UIElements).
Stars: ✭ 73 (+170.37%)
Mutual labels:  tooltips
Easy Toggle State
A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.
Stars: ✭ 261 (+866.67%)
Mutual labels:  tooltips
Ember Attacher
Native tooltips and popovers for Ember.js
Stars: ✭ 69 (+155.56%)
Mutual labels:  tooltips
Ngx Popper
An angular wrapper for popper.js, great for tooltips and positioning popping elements
Stars: ✭ 183 (+577.78%)
Mutual labels:  tooltips
Tooltip
Magento 2 attribute tooltip module
Stars: ✭ 23 (-14.81%)
Mutual labels:  tooltips
Balloon
🎈 Modernized and sophisticated tooltips, fully customizable with an arrow and animations on Android.
Stars: ✭ 2,242 (+8203.7%)
Mutual labels:  tooltips
Ft Syntax Highlight
Pure CSS syntax highlighter, no Javascript required. Includes built-in tooltips with UI themes and syntax highlighting themes
Stars: ✭ 42 (+55.56%)
Mutual labels:  tooltips
Html5tooltipsjs
Tooltips with smooth 3D animation
Stars: ✭ 892 (+3203.7%)
Mutual labels:  tooltips
Angular Tooltips
Angularjs tooltips module, add tooltips to your elements - https://720kb.github.io/angular-tooltips
Stars: ✭ 357 (+1222.22%)
Mutual labels:  tooltips
D3 Tip
d3 tooltips
Stars: ✭ 1,188 (+4300%)
Mutual labels:  tooltips
H.NotifyIcon.WPF
NotifyIcon for .Net Core 3.1 and .Net 5 WPF.
Stars: ✭ 44 (+62.96%)
Mutual labels:  tooltips
Niui
Lightweight, feature-rich, accessible front-end library
Stars: ✭ 152 (+462.96%)
Mutual labels:  tooltips
React-Tooltip-Controller
This is a feature-rich React component for controlling tooltips / pop-up menus
Stars: ✭ 21 (-22.22%)
Mutual labels:  tooltips
Drooltip.js
πŸ”₯ πŸ’¦ Minimalistic, powerful and extensible Vanilla JS tooltip library
Stars: ✭ 129 (+377.78%)
Mutual labels:  tooltips
Jquery Powertip
πŸ’¬ A jQuery plugin that creates hover tooltips.
Stars: ✭ 822 (+2944.44%)
Mutual labels:  tooltips
Tooltips
Simple to use library for android, enabling to add a tooltip near any view with ease
Stars: ✭ 723 (+2577.78%)
Mutual labels:  tooltips
Tether
A positioning engine to make overlays, tooltips and dropdowns better
Stars: ✭ 8,444 (+31174.07%)
Mutual labels:  tooltips

@popperjs/svelte

Use Popper in your Svelte projects.

Installation

yarn add @popperjs/svelte
# or
npm i @popperjs/svelte

Usage

<script>
  import Popper from "@popperjs/svelte";

  // super-simple CSS Object to string serializer
  const css = obj =>
    Object.entries(obj || {})
      .map(x => x.join(":"))
      .join(";");

  // DOM references to the interested elements
  let referenceElement;
  let popperElement;
  let arrowElement;

  // Popper options, reactive to update when arrowElement is set
  $: popperOptions = {
    modifiers: [
      { name: "offset", options: { offset: [0, 5] } },
      { name: "arrow", options: { element: arrowElement } }
    ]
  };

  // bound variables where Popper will store styles and attributes
  let styles = {};
  let attributes = {};

  console.log(styles);
</script>

<style>
  /* for some example styles, see `dev/App.svelte` */
</style>

<Popper
  reference={referenceElement}
  popper={popperElement}
  options={popperOptions}
  bind:styles
  bind:attributes>
  <button bind:this={referenceElement}>Reference Element</button>
  <div
    bind:this={popperElement}
    class="tooltip"
    style={css(styles.popper)}
    {...attributes.popper}>
    Popper Element
    <div bind:this={arrowElement} class="arrow" style={css(styles.arrow)} />
  </div>
</Popper>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].