π¨ templ-ui
templ-ui is a UI component library for templ - a powerful templating language for Go. Heavily influenced by shadcn and radix-ui, this repository contains a suite of UI components styled using Tailwind CSS that are ready to drop into your templ projects.
π Getting Started
Before you begin, make sure you're familiar with Go and templ. If you're new to templ, check out their documentation to get started.
Usage
To use templ-ui in your project:
- Choose the component you want from the
/components directory.
- Copy the
.templ file for that component into your application.
- Integrate it with your templ setup.
It's as simple as that!
[!NOTE]
There is a plan to create a CLI tool that will allow you to install components directly into your project. This is currently a work in progress.
Building from Source
If you'd like to contribute to templ-ui or use it as a starting point for your own UI component library, you can build it from source:
- Clone the repository:
git clone https://github.com/CalumMackenzie-Chambers/templ-ui.git
- Install Go dependencies specified in
go.mod: go mod download
- Install the templ CLI:
go install github.com/a-h/templ/cmd/templ@latest
- Install Air for live reloading:
go install github.com/cosmtrek/air@latest
- Run
npm install to install the necessary node modules.
- Start the development server with
npm run dev. When you add or modify a component, ensure to create or update its example on the website.
π License
templ-ui is open-sourced software licensed under the MIT license.
β€οΈ Acknowledgements
- templ: For providing the powerful templating language.
- shadcn: For inspiring the UI component structure.
- Tailwind CSS: For the utility-first CSS framework that makes styling a breeze.
- Radix UI: For the excellent UI primitives that inspire accessibility and customization.
π Contributing
Interested in contributing to templ-ui? We love your enthusiasm! Please read our Contributing Guidelines for details on how you can help and our code of conduct.
Happy coding! π