Card
Pick a card, any card. Memorized it? Remember it and put it back in the template.
Includes a Ruby component and corresponding Rails helper
RubyThe basic Card component comes with a few built-in elements.
I suggest you make it your own. Don't be afraid to make multiple card types and don't tie them too tightly together.
Example
Seal the deal
You've worked for this moment. It's time to make it official.
<%= nk_card do |c| %>
<%= nk_icon "landmark", class: "size-12" %>
<%= c.title "Seal the deal" %>
<%= c.body do %>
You've worked for this moment. It's time to make it official.
<% end %>
<%= c.footer(class: "justify-end") do %>
<%= nk_primary_button "Shake on it", icon: "handshake" %>
<% end %>
<% end %>
Advanced example
Here's a slightly more advanced example.
Top-Mounted Jet Engines
Tired of being stuck in traffic? See what we have in stock. Best prices in the market.
New!
Usage
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <div> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <h2> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <div> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <div> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <hr> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <div> element |