Skip to content

jbutkowski/iconic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A pure ruby wrapper around your favourite icon libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages