x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div class="space-y-4">
<div class="p-4 rounded border">
<h3 class="mb-2 text-lg font-semibold text-gray-800 dark:text-gray-200">Button Preview</h3>
<button role="button" style="default" type="button" class="inline-flex items-center relative m-0 font-medium transition-colors duration-200 overflow-hidden whitespace-nowrap border-0 bg-zinc-600 text-white hover:bg-zinc-700 focus:ring-zinc-500 dark:bg-zinc-500 dark:hover:bg-zinc-400 px-2.5 py-1.5 text-sm rounded-md justify-center"><span class="text-nowrap">Click me</span></button> </div>
<div class="p-4 mt-4 text-gray-800 bg-white rounded-lg shadow">
<h3 class="mb-2 text-lg font-semibold">Component Parameters:</h3>
<ul class="list-disc list-inside">
<li>Text: Click me</li>
<li>Style: default</li>
<li>Size: sm</li>
<li>Text Align: center</li>
<li>Full Width: false</li>
<li>Shape: rounded</li>
<li>Icon: </li>
<li>Icon Position: leading</li>
<li>URL: None</li>
</ul>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<div class="space-y-4">
<div class="p-4 rounded border">
<h3 class="mb-2 text-lg font-semibold text-gray-800 dark:text-gray-200">Button Preview</h3>
<%= rui_button(text: text, style: style, size: size, shape: shape, text_align: text_align, url: url, full_width: full_width) do |b| %>
<% if icon.present? %>
<% b.with_icon(name: icon, position: icon_position) %>
<% end %>
<% end %>
</div>
<div class="p-4 mt-4 text-gray-800 bg-white rounded-lg shadow">
<h3 class="mb-2 text-lg font-semibold">Component Parameters:</h3>
<ul class="list-disc list-inside">
<li>Text: <%= text %></li>
<li>Style: <%= style %></li>
<li>Size: <%= size %></li>
<li>Text Align: <%= text_align %></li>
<li>Full Width: <%= full_width %></li>
<li>Shape: <%= shape %></li>
<li>Icon: <%= icon %></li>
<li>Icon Position: <%= icon_position %></li>
<li>URL: <%= url || 'None' %></li>
</ul>
</div>
</div>
Param Description Input

Button text

Button style

Button size

Button shape

Button text alignment

Full width button?

Button URL (optional)

Button icon

Button icon position