Our great sponsors
-
gowebly
🔥 A next-generation CLI tool that makes it easy to create amazing web applications with Go on the backend, using htmx, hyperscript or Alpine.js and the most popular CSS frameworks on the frontend.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
// ./templates/pages/index.templ package pages // MetaTags defines meta tags. templ MetaTags(keywords, description string) { } // styledTextStyles defines CSS styles for component. css styledTextStyles() { color: blue; margin: 1rem 0; } // BodyContent defines HTML content. templ BodyContent(h1, text string) {
p>
{ h1 }h1>
{ text }p>
Hello from templstrong>!
Edit this styled text in the './templates/pages/index.templ' file. p>Documentationa>, GitHuba> p> div>
Show contentbutton>p>
div> div> div> main> } // BodyScripts defines JavaScript code. script BodyScripts() { console.log("Hello from templ!", "Edit this JavaScript code in the './templates/pages/index.templ' file."); }
I've released a big update to the Gowebly CLI project in v1.5.0 which includes Templ support for built-in net/http and all Go web frameworks: Fiber, go-chi and echo.
Helix: https://helix-editor.com/