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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<div class="p-8 space-y-8">
<div>
<h3 class="text-lg font-semibold mb-3">Auto Info Text</h3>
<nav aria-label="Pagination" class="flex flex-col items-center">
<div class="mb-2 text-sm text-grayscale-600">
Showing 41-60 of 195 results
</div>
<ul role="list" class="flex items-center gap-1.5">
<li>
<a href="#page-2" rel="prev" aria-label="Previous page" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4" aria-hidden="true">
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
</svg>
</a>
</li>
<li>
<a href="#page-1" aria-label="Go to page 1" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">1</a>
</li>
<li>
<a href="#page-2" aria-label="Go to page 2" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">2</a>
</li>
<li>
<span aria-current="page" aria-label="Page 3" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-primary-600 bg-primary-50 text-primary-700">3</span>
</li>
<li>
<a href="#page-4" aria-label="Go to page 4" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">4</a>
</li>
<li>
<a href="#page-5" aria-label="Go to page 5" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">5</a>
</li>
<li>
<span aria-hidden="true" class="inline-flex items-center justify-center min-w-9 h-9 text-sm px-3 text-grayscale-400 select-none"></span>
</li>
<li>
<a href="#page-10" aria-label="Go to page 10" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">10</a>
</li>
<li>
<a href="#page-4" rel="next" aria-label="Next page" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4" aria-hidden="true">
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
</svg>
</a>
</li>
</ul>
</nav>
</div>
<div>
<h3 class="text-lg font-semibold mb-3">Custom Info Slot</h3>
<nav aria-label="Pagination" class="flex flex-col items-center">
<div class="mb-2 text-sm text-grayscale-600">
<strong>Page 3</strong> of 10 — Displaying items 41–60
</div>
<ul role="list" class="flex items-center gap-1.5">
<li>
<a href="#page-2" rel="prev" aria-label="Previous page" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4" aria-hidden="true">
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
</svg>
</a>
</li>
<li>
<a href="#page-1" aria-label="Go to page 1" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">1</a>
</li>
<li>
<a href="#page-2" aria-label="Go to page 2" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">2</a>
</li>
<li>
<span aria-current="page" aria-label="Page 3" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-primary-600 bg-primary-50 text-primary-700">3</span>
</li>
<li>
<a href="#page-4" aria-label="Go to page 4" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">4</a>
</li>
<li>
<a href="#page-5" aria-label="Go to page 5" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">5</a>
</li>
<li>
<span aria-hidden="true" class="inline-flex items-center justify-center min-w-9 h-9 text-sm px-3 text-grayscale-400 select-none"></span>
</li>
<li>
<a href="#page-10" aria-label="Go to page 10" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">10</a>
</li>
<li>
<a href="#page-4" rel="next" aria-label="Next page" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4" aria-hidden="true">
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
</svg>
</a>
</li>
</ul>
</nav>
</div>
<div>
<h3 class="text-lg font-semibold mb-3">Last Page Info (partial page)</h3>
<nav aria-label="Pagination" class="flex flex-col items-center">
<div class="mb-2 text-sm text-grayscale-600">
Showing 181-195 of 195 results
</div>
<ul role="list" class="flex items-center gap-1.5">
<li>
<a href="#page-9" rel="prev" aria-label="Previous page" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4" aria-hidden="true">
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
</svg>
</a>
</li>
<li>
<a href="#page-1" aria-label="Go to page 1" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">1</a>
</li>
<li>
<span aria-hidden="true" class="inline-flex items-center justify-center min-w-9 h-9 text-sm px-3 text-grayscale-400 select-none"></span>
</li>
<li>
<a href="#page-8" aria-label="Go to page 8" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">8</a>
</li>
<li>
<a href="#page-9" aria-label="Go to page 9" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-grayscale-200 text-grayscale-700 hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700">9</a>
</li>
<li>
<span aria-current="page" aria-label="Page 10" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md border border-primary-600 bg-primary-50 text-primary-700">10</span>
</li>
<li>
<span aria-disabled="true" aria-label="Next page" class="inline-flex items-center justify-center font-medium transition-colors duration-200 min-w-9 h-9 text-sm px-3 rounded-md opacity-40 cursor-not-allowed pointer-events-none border border-grayscale-200 text-grayscale-400">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4" aria-hidden="true">
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
</svg>
</span>
</li>
</ul>
</nav>
</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
<div class="p-8 space-y-8">
<div>
<h3 class="text-lg font-semibold mb-3">Auto Info Text</h3>
<%= render BetterUi::Pagination::PaginationComponent.new(
current_page: 3,
total_pages: 10,
url: ->(page) { "#page-#{page}" },
show_info: true,
per_page: 20,
total_count: 195
) %>
</div>
<div>
<h3 class="text-lg font-semibold mb-3">Custom Info Slot</h3>
<%= render BetterUi::Pagination::PaginationComponent.new(
current_page: 3,
total_pages: 10,
url: ->(page) { "#page-#{page}" }
) do |pg| %>
<% pg.with_info do %>
<strong>Page 3</strong> of 10 — Displaying items 41–60
<% end %>
<% end %>
</div>
<div>
<h3 class="text-lg font-semibold mb-3">Last Page Info (partial page)</h3>
<%= render BetterUi::Pagination::PaginationComponent.new(
current_page: 10,
total_pages: 10,
url: ->(page) { "#page-#{page}" },
show_info: true,
per_page: 20,
total_count: 195
) %>
</div>
</div>