0.0
No release in over 3 years
A pure ruby wrapper around your favourite icon libraries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Iconic

A pure ruby wrapper around your favourite icon libraries.

Installation

  $ gem install iconic

Usage

Use the following whenever you want an icon...

Iconic.icon 'ban'

Or with options...

Iconic.icon 'bookmark-alt', { theme: 'heroicons', style: 'outline', width: 1, title: 'This is an icon' }

or create a helper method with custom default...

def icon(name, options = {})

  # custom default options
  options = options.dup
  options.fetch(:theme, 'bootstrap')
  options.fetch(:class, 'icon')
  options.fetch(:size, 18)

  raw(Iconic.icon(name, options))
end

Options

Defaults

theme: 'heroicons'  # Icon set name
style: 'outline'    # Icon subset name (only applicable to Heroicons)
size: 24            # Size. 24px
width: 2            # Stroke width
title:              # Title attribute (no default)
class:              # Class name (no default)

Themes (icon sets)

- heroicons
- bootstrap
- hugeicons
- heroicons
- lucide
- octicons
- tabler
- untitled-ui