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
<div class="flex flex-col gap-6"> <div> <p class="text-xs text-muted-foreground mb-2">All variants — disabled</p> <div class="flex flex-wrap items-center gap-3"> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Default</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-destructive text-white hover:bg-destructive/90 focus:ring-destructive h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Destructive</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:border-input! h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Outline</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-secondary text-secondary-foreground hover:bg-secondary/80 h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Secondary</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:text-muted-foreground! hover:bg-accent hover:text-accent-foreground disabled:bg-transparent! h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Ghost</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:text-muted-foreground! text-primary underline-offset-4 hover:underline disabled:bg-transparent! disabled:no-underline! h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Link</button> </div> </div> <div> <p class="text-xs text-muted-foreground mb-2">Disabled with icons</p> <div class="flex flex-wrap items-center gap-3"> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false"><i data-lucide="lock" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> Locked</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:border-input! h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false">Continue<i data-lucide="arrow-right" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-destructive text-white hover:bg-destructive/90 focus:ring-destructive h-9 w-9 disabled:cursor-not-allowed" disabled="disabled" aria-busy="false"><i data-lucide="x" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </button> </div> </div> <div> <p class="text-xs text-muted-foreground mb-2">Loading auto-disables (cursor-not-allowed shows on hover)</p> <div class="flex flex-wrap items-center gap-3"> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="true"><span class="sr-only">Loading, please wait</span><span role="status" aria-live="polite" class="inline-flex items-center"><span class="sr-only">Loading</span><i data-lucide="loader" class="inline-block shrink-0 w-4 h-4 animate-spin" aria-hidden="true"></i> </span> Saving</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-destructive text-white hover:bg-destructive/90 focus:ring-destructive h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="true"><span class="sr-only">Loading, please wait</span><span role="status" aria-live="polite" class="inline-flex items-center"><span class="sr-only">Loading</span><i data-lucide="loader" class="inline-block shrink-0 w-4 h-4 animate-spin" aria-hidden="true"></i> </span> Deleting</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! border border-input bg-background hover:bg-accent hover:text-accent-foreground disabled:border-input! h-9 px-4 py-2 disabled:cursor-not-allowed" disabled="disabled" aria-busy="true"><span class="sr-only">Loading, please wait</span><span role="status" aria-live="polite" class="inline-flex items-center"><span class="sr-only">Loading</span><i data-lucide="loader" class="inline-block shrink-0 w-4 h-4 animate-spin" aria-hidden="true"></i> </span> Loading</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
<div class="flex flex-col gap-6"> <div> <p class="text-xs text-muted-foreground mb-2">All variants — disabled</p> <div class="flex flex-wrap items-center gap-3"> <%= render(UI::Button.new(variant: :default, disabled: true)) { "Default" } %> <%= render(UI::Button.new(variant: :destructive, disabled: true)) { "Destructive" } %> <%= render(UI::Button.new(variant: :outline, disabled: true)) { "Outline" } %> <%= render(UI::Button.new(variant: :secondary, disabled: true)) { "Secondary" } %> <%= render(UI::Button.new(variant: :ghost, disabled: true)) { "Ghost" } %> <%= render(UI::Button.new(variant: :link, disabled: true)) { "Link" } %> </div> </div> <div> <p class="text-xs text-muted-foreground mb-2">Disabled with icons</p> <div class="flex flex-wrap items-center gap-3"> <%= render(UI::Button.new(disabled: true)) do |btn| btn.with_leading_icon(name: "lock") "Locked" end %> <%= render(UI::Button.new(variant: :outline, disabled: true)) do |btn| btn.with_trailing_icon(name: "arrow-right") "Continue" end %> <%= render(UI::Button.new(variant: :destructive, size: :icon, disabled: true)) do |btn| btn.with_leading_icon(name: "x") end %> </div> </div> <div> <p class="text-xs text-muted-foreground mb-2">Loading auto-disables (cursor-not-allowed shows on hover)</p> <div class="flex flex-wrap items-center gap-3"> <%= render(UI::Button.new(loading: true)) { "Saving" } %> <%= render(UI::Button.new(variant: :destructive, loading: true)) { "Deleting" } %> <%= render(UI::Button.new(variant: :outline, loading: true)) { "Loading" } %> </div> </div></div>No notes provided.
No params configured.