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
<div class="p-8 flex flex-col gap-8">
<nav class="midwest-pagination variant-default" aria-label="Pagination" data-controller="midwest-pagination" data-midwest-pagination-url-template-value="/posts?page=__PAGE__">
<div class="midwest-pagination-controls">
<a class="midwest-pagination-btn is-prev" aria-label="Go to previous page" href="/posts?page=4">
<div class="midwest-icon " aria-hidden="true">
<div class="midwest-icon-inner">
<svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Arrow back"><title>Arrow back</title>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M244 400L100 256l144-144M120 256h292"></path></svg>
</div>
</div>
</a>
<a class="midwest-pagination-btn" aria-label="Go to page 1" href="/posts?page=1">1</a>
<span class="midwest-pagination-ellipsis" aria-hidden="true"></span>
<a class="midwest-pagination-btn" aria-label="Go to page 3" href="/posts?page=3">3</a>
<a class="midwest-pagination-btn" aria-label="Go to page 4" href="/posts?page=4">4</a>
<span class="midwest-pagination-btn is-current" aria-current="page">5</span>
<a class="midwest-pagination-btn" aria-label="Go to page 6" href="/posts?page=6">6</a>
<a class="midwest-pagination-btn" aria-label="Go to page 7" href="/posts?page=7">7</a>
<span class="midwest-pagination-ellipsis" aria-hidden="true"></span>
<a class="midwest-pagination-btn" aria-label="Go to page 20" href="/posts?page=20">20</a>
<a class="midwest-pagination-btn is-next" aria-label="Go to next page" href="/posts?page=6">
<div class="midwest-icon " aria-hidden="true">
<div class="midwest-icon-inner">
<svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Arrow forward"><title>Arrow forward</title>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M268 112l144 144-144 144M392 256H100"></path></svg>
</div>
</div>
</a> </div>
<div class="midwest-pagination-footer">
<form class="midwest-pagination-jump" data-action="submit->midwest-pagination#jump">
<label for="page-jump-11eb8">Page</label>
<input type="number" id="page-jump-11eb8" autocomplete="off" min="1" max="20" value="5" data-midwest-pagination-target="jumpInput">
<button type="submit">Go</button>
</form>
<div class="midwest-pagination-per-page">
<label for="per-page-11eb8">Rows per page</label>
<select id="per-page-11eb8" data-action="change->midwest-pagination#navigate">
<option value="/posts?per_page=10&page=1" >
10
</option>
<option value="/posts?per_page=25&page=1" selected>
25
</option>
<option value="/posts?per_page=50&page=1" >
50
</option>
</select>
</div>
</div>
</nav>
</div>
1
2
3
4
5
6
7
8
9
10
11
<div class="p-8 flex flex-col gap-8">
<%= midwest_pagination(
current_page: 5,
total_pages: 20,
per_page: 25,
page_url: ->(p) { "/posts?page=#{p}" },
per_page_url: ->(n) { "/posts?per_page=#{n}&page=1" },
show_jump_to: true,
show_per_page: true
) %>
</div>

No assets to display.
Add a .js or .css file alongside the component to see it here.

Accessibility

Figma embed for Pagination/default

Annotate a preview to embed its Figma design here:

@figma "https://figma.com/..."