Documentation
¶
Overview ¶
templ: version: v0.2.793
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func C ¶
Example ¶
package main
import (
"context"
"os"
"github.com/a-h/templ"
"github.com/jfbus/templui/components/div"
"github.com/jfbus/templui/components/style"
)
func myComponent() templ.Component {
return templ.Raw(`Content`)
}
func main() {
c := div.C(div.D{
Content: myComponent(),
CustomStyle: style.Custom{
"div": style.D{
style.Set("text-sm"),
},
},
})
_ = c.Render(context.TODO(), os.Stdout)
}
Output: <div class="text-sm">Content</div>
Types ¶
Click to show internal directories.
Click to hide internal directories.