x
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<div class="space-y-12">
<div>
<h3 class="text-lg font-semibold">Default buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<button type="button" class="rounded-lg text-xs 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">Extra Small</span></button>
<button type="button" class="rounded-lg text-xs 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-white dark:bg-white bg-black dark:text-black hover:bg-black/80 dark:hover:bg-white/80"><span class="text-nowrap">Extra Small BnW</span></button>
<button type="button" class="rounded-lg text-xs 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-red-700 dark:text-red-200 bg-red-400/30 dark:bg-red-400/60 hover:bg-red-400/20 dark:hover:bg-red-400/70 border dark:border-red-700 border-red-200"><span class="text-nowrap">Extra Small Danger</span></button>
<button type="button" class="rounded-lg text-xs 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-sky-700 dark:text-sky-200 bg-sky-400/30 dark:bg-sky-400/60 hover:bg-sky-400/20 dark:hover:bg-sky-400/70 border dark:border-sky-700 border-sky-200"><span class="text-nowrap">Extra Small Info</span></button>
<button type="button" class="rounded-lg text-xs 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-gray-400 bg-gray-500 border-gray-600 dark:text-600 dark:bg-gray-700 disabled:cursor-not-allowed cursor-not-allowed disabled:text-gray-500 disabled:bg-gray-200 dark:disabled:opacity-75 disabled:pointer-events-none"><span class="text-nowrap">Extra Small Disabled</span></button>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Colored buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<button type="button" class="rounded-lg text-xs 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"> Extra Small</span></button>
<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">Small</span></button>
<button type="button" class="rounded-lg text-sm lg:text-base 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">Base</span></button>
<button type="button" class="rounded-lg text-sm lg:text-lg 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">Large</span></button>
<button type="button" class="rounded-lg text-sm lg:text-xl px-3 py-3 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">Extra Large</span></button>
<button type="button" class="rounded-lg text-sm lg:text-base 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 flex w-full"><span class="text-nowrap">Button - full width Base</span></button>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Shape buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<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">Rounded button</span></button>
<button type="button" class="rounded-full 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">Pill button</span></button>
<button type="button" class="rounded-none 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">Square button</span></button>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Default style with icons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<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"><svg aria-hidden="true" role="img" class="inline text-white animate-spin order-first ms-0 me-1.5 w-5 h-5 shrink-0" viewbox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-labelledby="icon-title-loading icon-desc-loading"><title id="icon-title-loading">Loading</title>
<desc id="icon-desc-loading">Loading icon</desc>
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="#E5E7EB"></path>
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentColor"></path>
</svg>
<span class="text-nowrap">Loading...</span></button> <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"><svg viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="order-first ms-0 me-1.5 w-5 h-5 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-shopping-cart icon-desc-shopping-cart"><title id="icon-title-shopping-cart">Shopping-cart</title>
<desc id="icon-desc-shopping-cart">Shopping-cart icon</desc>
<path d="M2.25 3H3.63568C4.14537 3 4.59138 3.34265 4.7227 3.83513L5.1059 5.27209M7.5 14.25C5.84315 14.25 4.5 15.5931 4.5 17.25H20.25M7.5 14.25H18.7183C19.8394 11.9494 20.8177 9.56635 21.6417 7.1125C16.88 5.89646 11.8905 5.25 6.75 5.25C6.20021 5.25 5.65214 5.2574 5.1059 5.27209M7.5 14.25L5.1059 5.27209M6 20.25C6 20.6642 5.66421 21 5.25 21C4.83579 21 4.5 20.6642 4.5 20.25C4.5 19.8358 4.83579 19.5 5.25 19.5C5.66421 19.5 6 19.8358 6 20.25ZM18.75 20.25C18.75 20.6642 18.4142 21 18 21C17.5858 21 17.25 20.6642 17.25 20.25C17.25 19.8358 17.5858 19.5 18 19.5C18.4142 19.5 18.75 19.8358 18.75 20.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<span class="text-nowrap">Buy now</span></button> <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"><svg viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="order-last ms-1.5 me-0 w-5 h-5 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-envelope icon-desc-envelope"><title id="icon-title-envelope">Envelope</title>
<desc id="icon-desc-envelope">Envelope icon</desc>
<path d="M21.75 6.75V17.25C21.75 18.4926 20.7426 19.5 19.5 19.5H4.5C3.25736 19.5 2.25 18.4926 2.25 17.25V6.75M21.75 6.75C21.75 5.50736 20.7426 4.5 19.5 4.5H4.5C3.25736 4.5 2.25 5.50736 2.25 6.75M21.75 6.75V6.99271C21.75 7.77405 21.3447 8.49945 20.6792 8.90894L13.1792 13.5243C12.4561 13.9694 11.5439 13.9694 10.8208 13.5243L3.32078 8.90894C2.65535 8.49945 2.25 7.77405 2.25 6.99271V6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<span class="text-nowrap">Send email</span></button> <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"><svg viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="animate-pulse text-emerald-700 dark:text-emerald-400 order-last ms-1.5 me-0 w-5 h-5 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-arrow-down-tray icon-desc-arrow-down-tray"><title id="icon-title-arrow-down-tray">Arrow-down-tray</title>
<desc id="icon-desc-arrow-down-tray">Arrow-down-tray icon</desc>
<path d="M3 16.5V18.75C3 19.9926 4.00736 21 5.25 21H18.75C19.9926 21 21 19.9926 21 18.75V16.5M16.5 12L12 16.5M12 16.5L7.5 12M12 16.5V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<span class="text-nowrap">Download now</span></button> </div>
</div>
<div>
<h3 class="text-lg font-semibold">Colored buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<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-red-700 dark:text-red-200 bg-red-400/30 dark:bg-red-400/60 hover:bg-red-400/40 hover:dark:bg-red-400/50 border dark:border-red-700 border-red-200"><span class="text-nowrap">Red Button</span></button>
<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-yellow-700 dark:text-yellow-200 bg-yellow-400/30 dark:bg-yellow-400/60 hover:bg-yellow-400/40 hover:dark:bg-yellow-400/50 border dark:border-yellow-700 border-yellow-200"><span class="text-nowrap">Yellow Button</span></button>
<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-green-800 dark:text-green-200 bg-green-400/20 dark:bg-green-400/40 hover:bg-green-400/30 hover:dark:bg-green-400/50 border dark:border-green-700 border-green-200"><span class="text-nowrap">Green Button</span></button>
<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-pink-700 dark:text-pink-200 bg-pink-400/30 dark:bg-pink-400/60 hover:bg-pink-400/40 hover:dark:bg-pink-400/50 border dark:border-pink-700 border-pink-200"><span class="text-nowrap">Pink Button</span></button>
<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-purple-700 dark:text-purple-200 bg-purple-400/30 dark:bg-purple-400/60 hover:bg-purple-400/40 hover:dark:bg-purple-400/50 border dark:border-purple-700 border-purple-200"><span class="text-nowrap">Purple Button</span></button>
<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-indigo-700 dark:text-indigo-200 bg-indigo-400/30 dark:bg-indigo-400/60 hover:bg-indigo-400/40 hover:dark:bg-indigo-400/50 border dark:border-indigo-700 border-indigo-200"><span class="text-nowrap">Indigo Button</span></button>
<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-amber-700 dark:text-amber-200 bg-amber-400/30 dark:bg-amber-400/60 hover:bg-amber-400/40 hover:dark:bg-amber-400/50 border dark:border-amber-700 border-amber-200"><span class="text-nowrap">Amber Button</span></button>
</div>
</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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<div class="space-y-12">
<div>
<h3 class="text-lg font-semibold">Default buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<%= rui_button(text: "Extra Small", size: :xs) %>
<%= rui_button(text: "Extra Small BnW", size: :xs, style: :bnw) %>
<%= rui_button(text: "Extra Small Danger", size: :xs, style: :danger) %>
<%= rui_button(text: "Extra Small Info", size: :xs, style: :info) %>
<%= rui_button(text: "Extra Small Disabled", size: :xs, style: :disabled) %>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Colored buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<%= rui_button(text: " Extra Small", size: :xs) %>
<%= rui_button(text: "Small", size: :sm) %>
<%= rui_button(text: "Base", size: :base) %>
<%= rui_button(text: "Large", size: :lg) %>
<%= rui_button(text: "Extra Large", size: :xl) %>
<%= rui_button(text: "Button - full width Base", size: :base, full_width: true) %>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Shape buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<%= rui_button(text: "Rounded button", shape: :rounded) %>
<%= rui_button(text: "Pill button", shape: :pill) %>
<%= rui_button(text: "Square button", shape: :square) %>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Default style with icons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<%= rui_button(text: "Loading...") do |button| %>
<% button.with_icon(name: "loading", position: :leading) %>
<% end %>
<%= rui_button(text: "Buy now") do |button| %>
<% button.with_icon(name: "shopping-cart", position: :leading) %>
<% end %>
<%= rui_button(text: "Send email") do |button| %>
<% button.with_icon(name: "envelope", position: :trailing) %>
<% end %>
<%= rui_button(text: "Download now") do |button| %>
<% button.with_icon(name: "arrow-down-tray", color: :success, position: :trailing, class: "animate-pulse") %>
<% end %>
</div>
</div>
<div>
<h3 class="text-lg font-semibold">Colored buttons</h3>
<div class="inline-flex flex-wrap gap-2 items-end mt-2">
<%= rui_button(text: "Red Button", style: :red) %>
<%= rui_button(text: "Yellow Button", style: :yellow) %>
<%= rui_button(text: "Green Button", style: :green) %>
<%= rui_button(text: "Pink Button", style: :pink) %>
<%= rui_button(text: "Purple Button", style: :purple) %>
<%= rui_button(text: "Indigo Button", style: :indigo) %>
<%= rui_button(text: "Amber Button", style: :amber) %>
</div>
</div>
</div>