Welcome
Matestack Ui Bootstrap - Beautiful, reactive web UIs, Ruby and you!
As an extension for matestack-ui-core, matestack-ui-bootstrapships all you need to build beautiful, reactive UIs in pure Ruby and smart CRUD components based on Bootstrap v5. Don't think about styling anymore and just create admin or application UIs faster than ever before!
Read about matestack-ui-core here: https://docs.matestack.io/matestack-ui-core

Why?

How much do you enjoy copy&pasting complex DOM structures and giant chains of CSS classes across your APP in order to create a decent looking UI?
With matestack-ui-core you're luckily able to build complex DOM structures ONCE in pure Ruby in a Matestack component and reuse it across your app without copy&pasting. So this component may look like this (without using matestack-ui-bootstrap!):
app/matestack/components/card_component.rb
1
class Components::CardComponent < Matestack::Ui::Component
2
3
required :title
4
optional :image_path, :content
5
6
def response
7
div class: "card shadow-sm border-0 bg-light" do
8
img path: context.image_path, class: "w-100" if context.image_path
9
body_partial
10
end
11
end
12
13
private
14
15
def body_partial
16
div class: "card-body" do
17
h5 context.title, class: "card-title"
18
paragraph context.content, class: "card-text" if context.content
19
end
20
end
21
22
end
Copied!
matestack-ui-core has no opinion about styling. That's why you need to build a Bootstrap card component (or whatever CSS approach you prefer) yourself.
In case you're into Bootstrap: Wouldn’t it be cool to have all Bootstrap components available like that in pure Ruby?
That's at least what we thought and why we've created matestack-ui-bootstrapshipping all you need to build beautiful, reactive UIs in pure Ruby and smart CRUD components based on Bootstrap v5.
So the card component is already implemented and would simply be used like that without any need of implementing the component yourself:
1
bs_card title: "foo", body: "bar"
Copied!
which renders:
1
<div class="card">
2
<div class="card-body">
3
<h5 class="card-title">foo</h5>
4
<p class="card-text">bar</p>
5
</div>
6
</div>
Copied!
You can see, how the prebuilt card component save you from writing 6 lines of HTML. And that's just a simple example. When using all kinds prebuilt components, you will stop writing a ton of HTML or copy&pasting DOM structure around. Do you what that makes with the readability and maintainability of your app? Not to speak about developer happiness...

Live Demo

Based on matestack-ui-core and matestack-ui-bootstrap this reactive dummy app was created in pure Ruby without writing any JavaScript, ERB/HAML/SLIM and CSS: (check it out | source code)
https://dummy.matestack.io

Getting Started

Before you dive into matestack-ui-bootstrap, make sure to have a solid understanding of matestack-ui-core first: https://docs.matestack.io/matestack-ui-core/getting-started/concepts-rails-integration
After that, it might be a good idea to get into using matestack-ui-bootstrap following the quick start guide:
If you know how to use matestack-ui-bootstrap, the API documentation should serve you well:

Roadmap

Do you want to know what we're currently working on and what's planned for the next releases? Check out our GitHub Project board: https://github.com/orgs/matestack/projects/1
Last modified 4mo ago