Tooltip
It's a secret little top hat for your elements
Includes a Ruby component and corresponding Rails helper
RubyIncludes a Stimulus controller
StimulusExample
Fill the tank
<% # Text content %>
<%= nk_tooltip(content: "Fill the tank") do |t| %>
<%= nk_button icon: "fuel" %>
<% end %>
<% # Block content %>
<%= nk_tooltip do |t| %>
<%= t.content do %>
Anything goes here
<% end %>
<%= nk_button icon: "fuel" %>
<% end %>
Dependencies
This component adds third-party dependencies:
Usage
| ||
---|---|---|
Property | Default | Description |
content | nil | Text content of the tooltip |
placement | nil | Floating UI Placement of the dropdown |
**attrs | HTML attributes for <span> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <div> element |