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 type="button" class="rounded-lg text-sm px-3 py-2 justify-center items-center inline-flex items-center relative m-0 dark:shadow-none font-medium focus:outline-none focus:ring-2 transition-colors duration-200 overflow-hidden shadow-sm whitespace-nowrap text-neutral-800 dark:text-white bg-white dark:bg-neutral-700 hover:bg-neutral-50 dark:hover:bg-neutral-600/75 border dark:border-neutral-600 border-neutral-200 hover:border-neutral-200 dark:hover:border-neutral-600"><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