Title

Usage

By default level 1 title is rendered.

<%= vt_title { "Dashboard" } %>

You can also render level 2, 3 and 4 titles.

<%= vt_title(level: 2) { "Dashboard" } %>
<%= vt_title(level: 3) { "Dashboard" } %>
<%= vt_title(level: 4) { "Dashboard" } %>

Custom attributes

Class

You can add custom classes to the title component by passing the class option.

<%= vt_title(class: "text-red-600") { "Dashboard" } %>

Data attributes

You can add custom data attributes to the title component by passing the data option.

<%= vt_title(data: { controller: "dashboard" }) { "Dashboard" } %>

Id

You can add an id to the title component by passing the id option.

<%= vt_title(id: "dashboard-title") { "Dashboard" } %>

Playground