https://github.com/mkhairi/undraw
unDraw rubygem, MIT licensed illustrations by unDraw for your rails projects
https://github.com/mkhairi/undraw
rails ruby svg undraw-rubygem
Last synced: 11 months ago
JSON representation
unDraw rubygem, MIT licensed illustrations by unDraw for your rails projects
- Host: GitHub
- URL: https://github.com/mkhairi/undraw
- Owner: mkhairi
- License: mit
- Created: 2018-10-10T10:08:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T06:05:57.000Z (almost 3 years ago)
- Last Synced: 2025-03-30T12:07:15.591Z (11 months ago)
- Topics: rails, ruby, svg, undraw-rubygem
- Language: Ruby
- Homepage: https://undraw.co/illustrations
- Size: 4.73 MB
- Stars: 109
- Watchers: 3
- Forks: 28
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# unDraw rubygem [](http://badge.fury.io/rb/undraw)
Embed SVG illustrations by [unDraw.io](https://undraw.co/illustrations) for your rails projects

## Installation
Add this line to your application's Gemfile:
```ruby
gem 'undraw'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install undraw
## Usage
Browse to find the [images](https://undraw.co/illustrations) that fit your needs. Take advantage of the on-the-fly color image generation to match your brand identity.
**hint: downcase the svg title and replace space with underscore. eg: `Features Overview` to `features_overview`
```ruby
# default color
<%= undraw("features_overview") %>
```
```ruby
# set size
<%= undraw("features_overview", color: "#3f51b5", size: "350*150") %>
```
```ruby
# set id
<%= undraw("building", color: "#ff6347", id: "undraw-building") %>
```
```ruby
# set class
<%= undraw("designer_life", color: "#ff6347", class: "undraw-designer-life") %>
```
## Update
Run bundle update to latest gem released
```$ bundle update undraw```
Due the license issue, any new illustrations released are no longer added to this gems and existing assets might be removed in a future release.
You need to manually download preferred svg file and put on:
```\vendor\images\undraw\.svg```
```ruby
# default color
<%= undraw("") %>
```
## Development
DEMO: http://materialize.labs.my/undraw
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/mkhairi/undraw. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Undraw project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mkhairi/undraw/blob/master/CODE_OF_CONDUCT.md).