Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 [Feature]: HTMX component #679

Open
3 tasks done
gedw99 opened this issue Jul 10, 2023 · 3 comments
Open
3 tasks done

🚀 [Feature]: HTMX component #679

gedw99 opened this issue Jul 10, 2023 · 3 comments
Labels
👍 Accepting PR ✏️ Feature New feature or request 💡 Help wanted Extra attention is needed

Comments

@gedw99
Copy link

gedw99 commented Jul 10, 2023

Feature Description

htmx allows backend devs to build html based GUI using https://github.com/gofiber/template and then updating the html i the browser.

The core concept with HTMX is that you update the GUI from the backend sending html that then replaces a target html DOM. Its highly productive and fast. Then you do not need React, Vue and all those complex gui libs.

Visual Demo

You can see running examples here with source code: https://htmx.org/examples/

Golang examples

Here are a few golang examples:

https://github.com/donseba/go-htmx

https://github.com/livefir/fir

All you need is to include one js in your html page.

Additional Context (optional)

htmx (and hyperscript, alpinejs) too.

Code Snippet (optional)

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.
@gedw99 gedw99 added the ✏️ Feature New feature or request label Jul 10, 2023
@gedw99
Copy link
Author

gedw99 commented Jul 28, 2023

https://github.com/rngallen/gohtmx/tree/main is a Fiber project using htmx.

@gedw99
Copy link
Author

gedw99 commented Nov 5, 2023

There are quite a few Fiber projects using htmx.

SSE tends to be the favoured way to send a notification to them cause a rewrite of sone html too .

@luisgarciaalanis
Copy link

I think the router might not be compatible with HTMX. you need to be able to compose routes and render partial nested page fragments when doing full page reloads, and if the htmx header is present only send the last page fragment (for htmx to handle the gluing on the browser).
IDK of any go library/framework that is able to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 Accepting PR ✏️ Feature New feature or request 💡 Help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants