Icon
Says more than a thousand words
Includes a Ruby component and corresponding Rails helper
RubyUses Lucide icons.
Example
<%= nk_icon "car" %>
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
| ||
---|---|---|
Property | Default | Description |
size | :md | One of :sm / :md / :lg |
**attrs | HTML attributes for <svg> element |