Icon

Says more than a thousand words
Includes a Ruby component and corresponding Rails helper
Ruby

Uses Lucide icons.

Example

<%= nk_icon "car" %>

Install

Set up Nitro Kit then

bin/rails generate nitro_kit:add icon

Dependencies

This component adds third-party dependencies:

Sizes

:sm
:md
:md

SVG attributes

Icons are output as inline <svg> elements. This makes it easy to change its properties, like stroke-width.

<%= nk_icon "car",
  class: "size-64",
  stroke_width: 0.2,
  fill: "rgba(0, 255, 255, 0.2)" %>

Usage

nk_icon(**attrs) { |dropdown| ... }
PropertyDefaultDescription
size:mdOne of :sm / :md / :lg
**attrsHTML attributes for <svg> element