Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jderochervlk/rescript-htmx
JSX types and bindings for HTMX
https://github.com/jderochervlk/rescript-htmx
Last synced: 9 days ago
JSON representation
JSX types and bindings for HTMX
- Host: GitHub
- URL: https://github.com/jderochervlk/rescript-htmx
- Owner: jderochervlk
- Created: 2024-05-16T16:07:44.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-16T18:48:13.000Z (7 months ago)
- Last Synced: 2024-12-03T14:07:33.171Z (20 days ago)
- Language: ReScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @jvlk/rescript-htmx
JSX types and bindings to use ReScript and HTMX together.https://htmx.org/
Requires Rescript 11+.
This is not meant to be a full implantation of HTMX with a server, it's just a starting point to build with HTMX and ReScript.
## Installation
```bash
npm i @jvlk/rescript-htmx
```
Update your project's `rescript.json` file.
```diff
{
"bs-dependencies": [
+ "@jvlk/rescript-htmx"
],
}
```
## How to use
### JSX props
HTMX requires special HTML attributes that you will need to add to your [custom JSX transform](https://rescript-lang.org/docs/manual/latest/jsx#generic-jsx-transform-jsx-beyond-react-experimental).```diff
module Elements = {
type props = {
...JsxDOM.domProps,
+ ...Htmx.JsxProps.t,
}
}
```
### JS Bindings
wip