active_element

0.0.13
Light Mode Dark Mode

Components

The core of ActiveElement is its set of components. These components are intended to be used within Rails views to reduce the amount of HTML developers need to write, as well as standardizing the look and feel of your application. A typical admin application should need very little (if any) custom HTML. If custom HTML is needed, the composable nature of the provided components allows for this.

See the individual documentation sections for each component, and visit the Decorators section to see how you can write composable partials to override the default data formatters as needed.

All examples demonstrate how to use a component in a Rails view. Every view rendered by a controller that inherits from ActiveElement::ApplicationController will have the active_element method available to them.

To use a component in your view, call (e.g.) active_element.component.form to render a Form component:

<%# app/views/users/new.html.erb %>

<%= active_element.component.form model: User.new, fields: [:email, :name] %>

Documentation generated by rspec-documentation