Hackers News

Introduction | templ docs

templ – build HTML with Go

Create components that render fragments of HTML and compose them to create screens, pages, documents, or apps.

  • Server-side rendering: Deploy as a serverless function, Docker container, or standard Go program.
  • Static rendering: Create static HTML files to deploy however you choose.
  • Compiled code: Components are compiled into performant Go code.
  • Use Go: Call any Go code, and use standard if, switch, and for statements.
  • No JavaScript: Does not require any client or server-side JavaScript.
  • Great developer experience: Ships with IDE autocompletion.
package main

templ Hello(name string) {
<div>Hello, { name }div>
}

templ Greeting(person Person) {
<div class="greeting">
@Hello(person.Name)
div>
}

admin

The realistic wildlife fine art paintings and prints of Jacquie Vaux begin with a deep appreciation of wildlife and the environment. Jacquie Vaux grew up in the Pacific Northwest, soon developed an appreciation for nature by observing the native wildlife of the area. Encouraged by her grandmother, she began painting the creatures she loves and has continued for the past four decades. Now a resident of Ft. Collins, CO she is an avid hiker, but always carries her camera, and is ready to capture a nature or wildlife image, to use as a reference for her fine art paintings.

Related Articles

Leave a Reply