ui icon indicating copy to clipboard operation
ui copied to clipboard

[feat]: Add support for Templ Golang templating library

Open FACorreiaa opened this issue 1 year ago • 2 comments

Feature description

The new CLI is amazing in adding new components to whatever framework one is using. A new library that is getting traction with Golang is called Templ. Templ is a Go templating engine used to render HTML or other text-based formats by dynamically injecting data into predefined templates. The Go html/template and text/template packages are the most common built-in options for templating in Go applications.

Templating engines like Templ allow developers to separate code logic from presentation, which is especially useful in web development. The template syntax in Go is simple and provides control over output formatting. Go templates support conditionals, loops, and functions for more complex rendering.

if there any chance to have support for this Golang templating library?

Affected component/components

No response

Additional Context

Templ library

Before submitting

  • [X] I've made research efforts and searched the documentation
  • [X] I've searched for existing issues and PRs

FACorreiaa avatar Sep 06 '24 11:09 FACorreiaa

Templ doesn't have actual UI logic, like you have with libraries like RadixUI that control behaviour, accessibility and hooking into other code.

In other word, templ very likely won't be a target of shadcn/ui because this uses React-specific libraries under the hood.

(Also, tell ChatGPT I said hi)

TheDevMinerTV avatar Sep 06 '24 11:09 TheDevMinerTV

@TheDevMinerTV I see efforts towards the fasthtml port which has similar logic limitations.

17twenty avatar Sep 11 '24 05:09 17twenty

Check this out: https://github.com/rotemhoresh/shadcn-templ (something I've been working on for a while). It's a work in progress. I'd love to hear your thoughts - is it what you expect of something of the sort?

rotmh avatar Oct 07 '24 07:10 rotmh

That's awesome Rotem - Just last week I started exploring it myself haha

https://github.com/17twenty/shadcn-go

I'll check out your repo, it's gotta be better to collaborate right!

On Mon, 7 Oct 2024 at 18:22, Rotem Horesh @.***> wrote:

Check this out: https://github.com/rotemhoresh/shadcn-templ (something I've been working on for a while). It's a work in progress. I'd love to hear your thoughts - is it what you expect of something of the sort?

— Reply to this email directly, view it on GitHub https://github.com/shadcn-ui/ui/issues/4760#issuecomment-2396119385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC4SKHTHHGNOXKEIDNV3DTZ2IZBVAVCNFSM6AAAAABNYMKT3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJWGEYTSMZYGU . You are receiving this because you commented.Message ID: @.***>

17twenty avatar Oct 07 '24 21:10 17twenty

Hey!

I had some exploration to see if something exists, somehow I missed it... I'll definitely check it out!

PS: Oh, it seems that your repo is from two weeks ago, that why I missed it. I've been working on it low key in another project for some time, and recently moved it to a dedicated repo.

rotmh avatar Oct 08 '24 07:10 rotmh

It's all good - i'll update my readme to point to yours. Would be keen to catchup and talk plans/roadmap for the project etc. I'm AU here - lmk!

17twenty avatar Oct 10 '24 02:10 17twenty

Hey, I'd like a collab :) Although, I'm rather new to the open-source / collaboration world... where are we chatting / catching up / planning?

rotmh avatar Oct 10 '24 05:10 rotmh

This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.

shadcn avatar Mar 02 '25 11:03 shadcn

No stale. Something went wrong with the stale bot.

shadcn avatar Mar 02 '25 11:03 shadcn