15
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RailsでMaterialアイコンを使う (Material Icons for Rails)

Posted at

Material Icons for Railsの使い方

Material Icons for RailsはRailsで簡単ににMaterial Designのアイコンを使えるGemです。

ダウンロード:https://github.com/Angelmmiguel/material_icons

インストール方法

Gemfileに以下を追加

Gemfile.
gem 'material_icons'

bundle installを実行する

CSS

application.cssに以下を追加

application.css
/*
 *= require material_icons
 */

呼び出し方

sample.html.erb
<i class="material-icons">face</i>
<i class="material-icons md-36">face</i>

その他のアイコン一覧

以下のサイトにアイコンとアイコン名の一覧があります
https://material.io/icons/

15
14
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?