Skip to content

Version 0.1.0

Compare
Choose a tag to compare
@chasefleming chasefleming released this 06 Oct 19:32
· 298 commits to main since this release

🚀 Introducing elem-go: A fresh library for creating HTML components programmatically in Go!

Highlights:

  • 🛠 Type-Safe HTML Generation: Leverage the strong typing features of Go. With elem-go, enjoy type safety in defining and manipulating HTML elements, minimizing potential runtime errors and ensuring a smoother development experience.
  • 📦 Common HTML Elements & Attributes: Simplify your codebase! elem-go encapsulates the complexity behind defining HTML attributes and elements, making your code more readable and maintainable.
  • 💡 Integrated htmx Helpers: Craft dynamic web elements effortlessly with the built-in htmx helpers. No need for verbose attribute strings anymore.
  • 📖 Examples to Kickstart: Dive into the examples directory for hands-on usage of elem-go. Start with the htmx-counter demonstration!

New Features:

  • HTML Elements: Comprehensive support for a wide array of HTML elements—from basic divisions (Div) to headers (H1, H2, …) and interactive components.
  • Attributes & Styling: Use the attrs and styles subpackages to define element attributes and styles in a type-safe manner confidently.
  • htmx Integration: The new htmx subpackage provides constants and utility functions tailored for htmx specific attributes.
  • Conditional Rendering: Introducing the utility function Show for conditional rendering of elements.

Getting Started:

  1. Install with go get github.com/chasefleming/elem-go
  2. Explore the detailed documentation to understand the full spectrum of features.
  3. Try out the examples directory to see elem-go in real-world scenarios.