2.1.1 • Published 10 months ago
@advect/advect v2.1.1
Advect
Write plain html and unlock the power of web components NO BUILD STEP, and with as little "Magic" as possible,
I think every front end developer got hyped when when webcomponents were announced
Advect brings locality of behavior to web compenents.
On the web we have 3 types of html content
- Plain Jane html
Installation
npm
npx jsr add @advect/advectpnpm
pnpm dlx jsr add @advect/advectbun
bunx jsr add @advect/advectyarn
yarn dlx jsr add @advect/advectdeno
deno add @advect/advectFeatures
Create webcomponents with Plain HTML
<!-- import advect -->
<script src="advect.js"></script>
<!--
define a webcompnent with a template tag that has a "adv" attribute
the id will become the tag of the new component in this case "my-btn"
-->
<template id="my-btn" adv>
<!-- style the new compnent -->
<style>
:host{
button {
color:blue;
}
}
</style>
<button>
<slot name="name">Default Name</slot>
<slot name="icon">🤯</slot>
</button>
</template>
<!-- Now your web compnent is ready to use -->
<my-btn>
<span slot="name">New icon / name</span>
<span slot="icon">😉</span>
</my-btn>
<my-btn onclick="alert('unless you want to')">
<span slot="name">No JS</span>
<span slot="icon">😍</span>
</my-btn>- HTMX Compatibility
About
Philosophy
Goals
Motivations
Insprations
- HATEOS
- Lit, Alpine,
2.0.3
11 months ago
2.1.1
10 months ago
2.0.2
11 months ago
2.0.5
11 months ago
2.0.4
11 months ago
2.0.7
11 months ago
2.0.6
11 months ago
2.0.31
11 months ago
2.1.0
10 months ago
2.0.1
11 months ago
2.0.0
11 months ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago