package

github.com/stephannv/blueprint

1.1.0 / published Jan 5, 2026 / repository

A lib for writing reusable and testable views templates (HTML, SVG, Forms) in plain Crystal. Inspired by Phlex.

<picture> Blueprint logo </picture>

A lib for writing reusable and testable views templates (HTML, SVG, Forms) in plain Crystal.

Tests Weekly CI Zero dependencies


Example:

class Alert
  include Blueprint::HTML

  private def blueprint
    div class: &quot;alert alert-success&quot; do
      h4(class: &quot;alert-heading&quot;) { &quot;Well done!&quot; }
      p { &quot;Hello Word&quot; }
    end
  end
end

Alert.new.to_s

Output:

&lt;div class=&quot;alert alert-success&quot;&gt;
  &lt;h4 class=&quot;alert-heading&quot;&gt;Well done!&lt;/h4&gt;
  &lt;p&gt;Hello World&lt;/p&gt;
&lt;/div&gt;

Documentation

For full documentation, visit https://stephannv.github.io/blueprint-docs/.

Contributing

  1. Fork it (https://github.com/stephannv/blueprint/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

API