Skip to content

100yrs/pulse_view_components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulse ViewComponents

Pulse ViewComponents is an implementation of the future Pulse Design System using ViewComponent.

The implementation borrows heavily from Primer ViewComponents and Polaris ViewComponents.

This is still a work in progress and breaking changes may occur. Currently this requires Ruby 3.4 and Rails 8.1.

Usage

Render Pulse ViewComponents:

<%= render(Pulse::Badge.new(scheme: :primary)) { 'Primary' } %>

Dependencies

Installation

Add pulse_view_components to your Gemfile:

bundle add pulse_view_components

Add stylesheet and javascript links to your application layout:

<%= stylesheet_link_tag 'pulse_view_components' %>
<%= javascript_include_tag 'pulse_view_components' %>
<%= javascript_include_tag 'js/pulse_view_components', 'data-turbo-track': 'reload', defer: true %>

Development

To get started:

  1. Run: bundle install
  2. Run: yarn install
  3. Run: bin/dev

It will open demo app with component previews on localhost:4000. You can change components and they will be updated on page reload. Component previews are located at /previews.

To run tests:

rake

Releases

The library follows semantic versioning. To draft a new release you need to run script/release with a new version number:

bin/release VERSION

Where the VERSION is the version number you want to release. This script will update the version in the gem and push it to GitHub and Rubygems automatically.

License

The gem is available as open source under the terms of the MIT License.

About

Pulse View Components

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors