Skip to content

Commit

Permalink
Update Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejtrybilo committed Nov 8, 2024
1 parent 98d4e28 commit e5fdf14
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ div(.hx.ext(.ws), .ws.connect("/echo")) {
}
```

```swift
import Elementary
import ElementaryHyperscript

// Hyperscript extension
button(.hs("on click send hello to <form />")) {
"Send"
}
```

## Play with it

Check out the [Hummingbird example app](https://github.com/sliemeobn/elementary-htmx/tree/main/Examples/HummingbirdDemo).
Expand All @@ -59,6 +69,8 @@ The package brings the `.hx` syntaxt to all `HTMLElements` - providing a rich AP

There is also an `ElementaryHTMXSSE` module that adds the `.sse` syntax for the [Server Sent Events extensions](https://github.com/bigskysoftware/htmx-extensions/blob/main/src/sse/README.md), as well as `ElementaryHTMXWS` to add the `.ws` syntax for the [WebSockets extensions.](https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ws/README.md)

The package also supports the [Hyperscript](https://hyperscript.org) `_` attribute as `.hs`.

## Future directions

- Add module (or separate package?) for HTMX Request and Response headers
Expand Down

0 comments on commit e5fdf14

Please sign in to comment.