Introduction
LesliView is the official user-interface library for the Lesli Framework.
It combines ViewComponent-powered building blocks, Rails form builders, and shared interface patterns to help Lesli applications remain consistent, reusable, and maintainable.
Features
- Reusable Rails ViewComponents
- Form builders with consistent fields, inputs, and fieldsets
- Application layout and navigation components
- Buttons, tables, avatars, and empty states
- Charts, calendars, counters, dates, and weather widgets
- Tasks, discussions, activities, and attachment interfaces
- Shared Tailwind-based presentation for Lesli applications
Installation
Add LesliView to the Rails application:
bundle add lesli_viewBundler installs ViewComponent and the other required runtime dependencies automatically.
Usage
Render a component
Render LesliView components from any Rails template:
<%= render(LesliView::Layout::Container.new("tickets")) do %>
<%= render(LesliView::Components::Header.new("Tickets")) %>
<% end %>Render an element
Elements provide smaller interface building blocks:
<%= render(
LesliView::Elements::Button.new(
"Create ticket",
icon: "add",
solid: true,
url: new_ticket_path
)
) %>Use the form builder
Pass the LesliView builder to Rails form helpers:
<%= form_with(
model: @ticket,
builder: LesliView::Forms::Builder
) do |form| %>
<%= form.field_control_text :subject %>
<%= form.field_control_textarea :description %>
<%= form.field_control_submit "Save ticket" %>
<% end %>Library
LesliView organizes its interface building blocks into focused groups:
- Charts: bar, line, and general chart rendering
- Components: headers, panels, tabs, timelines, and toolbars
- Elements: avatars, buttons, empty states, and tables
- Forms: standard and horizontal builders, fields, inputs, and fieldsets
- Items: actions, activities, attachments, discussions, and tasks
- Layouts: shared application containers
- Partials: reusable engine information
- Widgets: calendars, charts, counters, dates, and weather
Detailed examples and available options are maintained in the LesliView documentation.
Development
Clone the repository and install its dependencies:
git clone https://github.com/LesliTech/LesliView.git
cd LesliView
bundle installTo develop LesliView inside a Rails workspace, reference the local source from the host application's Gemfile:
gem "lesli_view", path: "gems/LesliView"Tests
Run the default test task from the LesliView directory:
bundle exec rakeDocumentation
Community
License
Copyright (c) 2026, Lesli Technologies, S. A.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
The complete license text is available in the license file.