Previews

No matching results.

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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<div class="flex flex-col gap-10 p-6">
<div>
<h2 class="heading-20 mb-4">Default</h2>
<div style="width: 430px;">
<form id="grid_form_empty" action="#" accept-charset="UTF-8" method="get">
<p class="copy-12 text-gray-500 mb-2">Label</p>
<div id="looposui-inputs-select_option_empty_5793709857" class="grow" data-controller="input-select" data-input-select-mode-value="form" data-input-select-variant-value="grid">
<div class="lui-input-select lui-input-select--grid lui-inputs__select lui-input-select--grid" role="listbox">
<div class="lui-input-select__grid-options">
<span class="lui-button__tooltip-wrapper inline-flex w-full">
<button class="lui-button lui-button--size-small lui-button--neutral--secondary w-full w-full relative" data-controller="lui--button" data-input-select-target="option" data-action="click->input-select#selectGridOption" data-text="Option 1" data-value="1" type="button" role="option">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Option 1
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 14px;">
progress_activity
</i>
</div>
</button></span>
<span class="lui-button__tooltip-wrapper inline-flex w-full">
<button class="lui-button lui-button--size-small lui-button--neutral--secondary w-full w-full relative" data-controller="lui--button" data-input-select-target="option" data-action="click->input-select#selectGridOption" data-text="Option 2" data-value="2" type="button" role="option">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Option 2
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 14px;">
progress_activity
</i>
</div>
</button></span>
<span class="lui-button__tooltip-wrapper inline-flex w-full">
<button class="lui-button lui-button--size-small lui-button--neutral--secondary w-full w-full relative" data-controller="lui--button" data-input-select-target="option" data-action="click->input-select#selectGridOption" data-text="Option 3" data-value="3" type="button" role="option">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Option 3
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 14px;">
progress_activity
</i>
</div>
</button></span>
</div>
</div>
<input type="hidden" name="option_empty" id="option_empty" data-input-select-target="hiddenInput" />
</div>
</form>
</div>
</div>
<div>
<h2 class="heading-20 mb-4">Pre-selected</h2>
<div style="width: 430px;">
<form id="grid_form_preselected" action="#" accept-charset="UTF-8" method="get">
<p class="copy-12 text-gray-500 mb-2">Label</p>
<div id="looposui-inputs-select_option_preselected_9912568611" class="grow" data-controller="input-select" data-input-select-mode-value="form" data-input-select-variant-value="grid">
<div class="lui-input-select lui-input-select--grid lui-inputs__select lui-input-select--grid" role="listbox">
<div class="lui-input-select__grid-options">
<span class="lui-button__tooltip-wrapper inline-flex w-full">
<button class="lui-button lui-button--size-small lui-button--neutral--secondary w-full w-full relative" data-controller="lui--button" data-input-select-target="option" data-action="click->input-select#selectGridOption" data-text="Option 1" data-value="1" type="button" role="option" aria-selected="true">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Option 1
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 14px;">
progress_activity
</i>
</div>
</button></span>
<span class="lui-button__tooltip-wrapper inline-flex w-full">
<button class="lui-button lui-button--size-small lui-button--neutral--secondary w-full w-full relative" data-controller="lui--button" data-input-select-target="option" data-action="click->input-select#selectGridOption" data-text="Option 2" data-value="2" type="button" role="option" aria-selected="false">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Option 2
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 14px;">
progress_activity
</i>
</div>
</button></span>
<span class="lui-button__tooltip-wrapper inline-flex w-full">
<button class="lui-button lui-button--size-small lui-button--neutral--secondary w-full w-full relative" data-controller="lui--button" data-input-select-target="option" data-action="click->input-select#selectGridOption" data-text="Option 3" data-value="3" type="button" role="option" aria-selected="false">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Option 3
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 14px;">
progress_activity
</i>
</div>
</button></span>
</div>
</div>
<input type="hidden" name="option_preselected" id="option_preselected" value="1" data-input-select-target="hiddenInput" />
</div>
<div class="mt-6 flex justify-end">
<span class="lui-button__tooltip-wrapper inline-flex w-fit">
<button class="lui-button lui-button--neutral--primary lui-button--size-default w-fit w-fit relative" data-controller="lui--button">
<span class="lui-button__text opacity-100 inline-flex" data-lui--button-target="text">
Submit
</span>
<div class="absolute w-full flex items-center justify-center opacity-0" data-lui--button-target="loadingIcon">
<i class="lui-m_icon animate-spin material-symbols-rounded" style="--lui-micon-size: 16px;">
progress_activity
</i>
</div>
</button></span>
</div>
</form>
</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
<%
options = [
{ value: "1", text: "Option 1" },
{ value: "2", text: "Option 2" },
{ value: "3", text: "Option 3" },
]
%>
<div class="flex flex-col gap-10 p-6">
<div>
<h2 class="heading-20 mb-4">Default</h2>
<div style="width: 430px;">
<%= form_with url: "#", method: :get, id: "grid_form_empty" do %>
<p class="copy-12 text-gray-500 mb-2">Label</p>
<%= render LooposUi::Inputs::Select.new(
name: "option_empty",
options: options,
variant: :grid,
mode: :form,
help: params[:help].presence,
error: params[:error].presence,
) %>
<% end %>
</div>
</div>
<div>
<h2 class="heading-20 mb-4">Pre-selected</h2>
<div style="width: 430px;">
<%= form_with url: "#", method: :get, id: "grid_form_preselected" do %>
<p class="copy-12 text-gray-500 mb-2">Label</p>
<%= render LooposUi::Inputs::Select.new(
name: "option_preselected",
options: options,
value: "1",
variant: :grid,
mode: :form,
help: params[:help].presence,
error: params[:error].presence,
) %>
<div class="mt-6 flex justify-end">
<%= render LooposUi::Button.new(text: "Submit", kind: :neutral) %>
</div>
<% end %>
</div>
</div>
</div>
Param Description Input

Helper text below the input

Validation error message