This is a work in progress. ugh!
awcodes / alpine-floating-ui Goto Github PK
View Code? Open in Web Editor NEWAdd Floating UI functionality to Alpine 3.x components.
License: MIT License
Add Floating UI functionality to Alpine 3.x components.
License: MIT License
This is a work in progress. ugh!
The drop-down list begins its movement somewhere outside the screen or bottom of the screen.
The bug appeared in the latest version of the commit. It's not in this one LINK
<script type="module">
import FloatingUI from 'js/floating-alpine.esm.js';
document.addEventListener("alpine:initializing", () => {
FloatingUI(window.Alpine);
});
</script>
@click="$refs.panel.toggle"
@click.away="$refs.panel.close()"
<div x-ref='panel' x-float.placement.bottom-start.flip.offset
class="absolute w-full z-20 rounded-lg shadow-grey-2xl bg-white overflow-hidden transition-all duration-500 max-h-72 overflow-y-auto">
content
</div>
latest ver:
and older:
Hi,
I'm just trying to get the example with the $float() magic working. I would expect the "I'm floating" element to be hidden by default. While the visibility will be toggled with the button. Do I miss something?
Best, Arne
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@awcodes/[email protected]/dist/cdn.min.js" defer></script>
<script defer src="https://unpkg.com/@alpinejs/[email protected]/dist/cdn.min.js"></script>
</head>
<body>
<div class="component" x-data>
<button @click="$float()">I have a floating panel. Woot!</button>
<div x-ref="panel" class="panel">I'm floating</div>
</div>
</body>
</html>
@awcodes - let me just start by saying that this library is excellent! It works just as expected and is very much appreciated.
I'm working on an implementation and am trying to match the size of the dropdown to the reference width using the size middleware (https://floating-ui.com/docs/size). It appears, however, that this library doesn't support the size middleware at all yet. Are there plans on your end for implementing it? If you have no plans to do so I may be able to take a shot at it in the next few weeks.
Hi folks,
what is the difference to the Alpine first-party anchor plugin? They say it's based on Floating UI, too? But this plugin seems to have much more features?!
Best, Arne
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.