Discover Packages
github.com/MathisVerstrepen/templ_ui_library
command
module
Version:
v0.0.0-...-2f685a5
Opens a new window with list of versions in this module.
Published: Aug 3, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
Templ UI Library
Material UI components for Go web applications using the templ templating engine, htmx and Tailwind CSS.
Prerequisites
Go 1.21 or later
templ CLI tool
Docker (optional, for containerization)
Getting Started
Clone this repository:
git clone https://github.com/MathisVerstrepen/htmx_templ_template.git
cd htmx_templ_template
Install dependencies:
go mod tidy
Install Air for live reload:
go install github.com/air-verse/air@latest
alias air="~/go/bin/air"
Install templ CLI tool:
go install github.com/a-h/templ/cmd/templ@latest
Install tailwind dependencies:
npm install
Run the development server:
air
Open your browser and navigate to http://localhost:4269
Project Structure
.
├── assets
│ └── css
│ └── favicon
│ └── images
├── components
├── handlers
├── models
├── services
├── ui
├── main.go
├── Dockerfile
├── go.mod
├── go.sum
└── README.md
└── .air.toml
└── .env
Development
Use air to start the development server with live reload.
Add new routes in main.go.
Create handlers in the /handlers directory.
Add templ components in the /components directory.
Building for Production
Build the binary:
go build -o bin/server
Run the production server:
./bin/server
Docker Support
Build the Docker image:
docker compose build
Run the container:
docker compose up
License
This project is licensed under the MIT License - see the LICENSE file for details.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.