# Can v0.4.1: server-side HTML components for Crystal

**URL:** <https://forum.crystal-lang.org/t/can-v0-4-1-server-side-html-components-for-crystal/8968>\
**Category:** News\
**Tags:** release\
**Created:** [June 1, 2026, 9:09pm UTC](https://forum.crystal-lang.org/t/can-v0-4-1-server-side-html-components-for-crystal/8968 "2026-06-01T21:09:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trans](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/trans/32/1255_2.png) [@trans](https://forum.crystal-lang.org/u/trans)\
**Post date:** [June 1, 2026, 9:09pm UTC](https://forum.crystal-lang.org/t/can-v0-4-1-server-side-html-components-for-crystal/8968/1 "2026-06-01T21:09:43Z")

</div>

Hi. I am working on Can, currently a pre-1.0 server-side HTML component system for Crystal.

The basic idea is to write components as HTML in “cans” (`.can` files) and compile those templates to Crystal before the app runs. It is not a JavaScript framework, and there is no runtime template parser.

Can currently supports:

- component defs
- slots
- scoped CSS
- literal quoted attributes
- expression attributes
- template-level `<.use>`, loading can in can.
- `can-render`, a small CLI for rendering a single `.can` file in static tests/experiments

Should work well for Crystal SSR projects, Kemal, Grip or `HTTP::Server` apps, and exploring an HTML-first component model in Crystal.

The important caveats: pre-1.0, I am not yet presenting it as production-ready infrastructure.  
and `can-render` tool is not a full static site generator; it renders _one_ `.can` file. A broader static-site workflow is a natural direction, but not something I haven’t dug into yet. In the mean time works for served site which is it main use case.

Links:

- Repo: [GitHub - trans/can: Crystal Web Component Framework · GitHub](https://github.com/trans/can)
- Landing page/Docs: [Can - Server-Side HTML Components for Crystal](https://trans.github.io/can/)

I would especially like feedback on:

- whether the README explains the value quickly enough
- whether the component model feels natural for Crystal
- what example would make this easiest to evaluate
- would a full static site generation be good addition
- any and all other suggestions, issues, etc.

And, yes, I vibe code these days. But I do make an effort to keep the project focus small, and manually review the source as I have time. Plus, super helpful is Crystal itself – it lends itself to cleaner code in general.

Thanks.

---

<div class="post-metadata">

**Author:** ![Xen](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/xen/32/2288_2.png) [@Xen](https://forum.crystal-lang.org/u/Xen)\
**Post date:** [June 2, 2026, 7:38pm UTC](https://forum.crystal-lang.org/t/can-v0-4-1-server-side-html-components-for-crystal/8968/2 "2026-06-02T19:38:33Z")

</div>

Oh nice.

> [@trans](#):
>
> - what example would make this easiest to evaluate
> - would a full static site generation be good addition

Well, ever since David presented Rails, “here’s how you build a blog” has been the goto example for web-frameworks. As this isn’t quite a full framework, the static site generator sounds like the best way to show off the strengths of Can.

> [@trans](#):
>
> And, yes, I vibe code these days. But I do make an effort to keep the project focus small, and manually review the source as I have time. Plus, super helpful is Crystal itself – it lends itself to cleaner code in general.

OT: I’ve thrown myself at the LLM with my own little, wait for it, web-framework. The objective has been getting used to using the LLM and trying out some wild ideas in practice. I’d never got as far as I have with my limited free time on my own, so there’s that. I wouldn’t call it “vibe-coding” though, as even though it’s 99% written by Gemini, I pour over each diff and occasionally take it upon myself to rewrite the method that it can’t get right.
