@rogieking/figui3
Version:
A lightweight, customizable web component library that uses Figmas UI3 style for modern web applications, but specifically for Figma plugins.
39 lines (36 loc) • 978 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>Figma UI3 Web Components</title>
<link rel="stylesheet"
type="text/css"
href="fig.css">
<script src="fig.js"></script>
<style>
body {
width: 480px;
margin: 0 auto;
}
</style>
</head>
<body>
<fig-content>
<fig-slider type="delta"
value=".25"
default="2"
step="0.1"
max="5"
min="-5">
</fig-slider>
</fig-content>
<script>
let elements = Array.from(document.querySelectorAll('*'));
elements.filter(n => n.tagName.toLowerCase().indexOf("fig-") > -1).forEach(n => n.addEventListener('input', (e) => {
console.log('input:', n.tagName, e.target)
}))
</script>
</body>
</html>