Sha256: 1c97e71cb9925bff019d6d2f2bd63f613f8482d325745eca7d960240bc6bdc67

Contents?: true

Size: 1.08 KB

Versions: 19

Compression:

Stored size: 1.08 KB

Contents

# 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](decorators.html) 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](components/form.html) component:

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
active_element-0.0.31 rspec-documentation/pages/010-Components.md
active_element-0.0.30 rspec-documentation/pages/010-Components.md
active_element-0.0.29 rspec-documentation/pages/010-Components.md
active_element-0.0.28 rspec-documentation/pages/010-Components.md
active_element-0.0.27 rspec-documentation/pages/010-Components.md
active_element-0.0.26 rspec-documentation/pages/010-Components.md
active_element-0.0.24 rspec-documentation/pages/010-Components.md
active_element-0.0.23 rspec-documentation/pages/010-Components.md
active_element-0.0.22 rspec-documentation/pages/010-Components.md
active_element-0.0.21 rspec-documentation/pages/010-Components.md
active_element-0.0.19 rspec-documentation/pages/010-Components.md
active_element-0.0.18 rspec-documentation/pages/010-Components.md
active_element-0.0.17 rspec-documentation/pages/010-Components.md
active_element-0.0.16 rspec-documentation/pages/010-Components.md
active_element-0.0.15 rspec-documentation/pages/010-Components.md
active_element-0.0.14 rspec-documentation/pages/010-Components.md
active_element-0.0.13 rspec-documentation/pages/010-Components.md
active_element-0.0.12 rspec-documentation/pages/010-Components.md
active_element-0.0.11 rspec-documentation/pages/010-Components.md