As an extension for
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!
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?
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
app/matestack/components/card_component.rbclass Components::CardComponent < Matestack::Ui::Componentrequired :titleoptional :image_path, :contentdef responsediv class: "card shadow-sm border-0 bg-light" doimg path: context.image_path, class: "w-100" if context.image_pathbody_partialendendprivatedef body_partialdiv class: "card-body" doh5 context.title, class: "card-title"paragraph context.content, class: "card-text" if context.contentendendend
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:
bs_card title: "foo", body: "bar"
<div class="card"><div class="card-body"><h5 class="card-title">foo</h5><p class="card-text">bar</p></div></div>
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...
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:
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