Last active
December 26, 2019 17:35
-
-
Save AutoSponge/b410b51a0382a67f537f3c6c91943a78 to your computer and use it in GitHub Desktop.
alpine-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Hello!</title> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="/style.css"> | |
<script | |
src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v1.1.1/dist/alpine.min.js" | |
defer></script> | |
</head> | |
<body x-data="{ open: false }" x-on:keydown.escape="open = false"> | |
<h1>Hi there!</h1> | |
<a href="#">home</a> | |
<div> | |
<button x-on:click="open = true">Open | |
Dropdown</button> | |
<ul x-show="open" x-on:click.away="open = false"> | |
Dropdown Body | |
</ul> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"libraries": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/alpinejs/alpine | |
// doesn't have esc to close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment