bh v0.0.16 Bh.Bh3.Progress View Source

Twitter Bootstrap 3 progress bar helpers for Phoenix.

Link to this section Summary

Functions

Generates progress bar HTML markup.

Link to this section Functions

Generates progress bar HTML markup.

Options

  • :percentage - used as a value of a progress bar. Default value - 0 (zero progress).

  • :context - context of the progress bar. Be default context is not needed, so helper renderes blue proggress bar. Allowed options: :success, :info, :warning and :danger.

  • :striped - boolean value. Pass true if you need striped progress bar. By default progress bar is not striped.

  • :animated - boolean value. Pass true if you need animated progress bar. Be default progress bar has no CSS3 amination. Note, that only striped progress bars can be animated.

Examples

Render markup for progress:

<%= bh_progress percentage: 60 %>
<div class="progress">
  <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
    <span class="sr-only">60% Complete</span>
  </div>
</div>