list-bar
Màn hình danh sách Màn hình danh sách thông thường: tiêu đề, thanh công cụ và các hàng, chạy được cả trên máy tính lẫn điện thoại.
Thanh công cụ ở đầu thẻ danh sách, có tìm kiếm và bộ lọc.
Mỗi ví dụ đều hoạt động thật, nhưng các liên kết trong đó không dẫn đến đâu. HTML hiển thị mã đánh dấu để sao chép.
Tìm kiếm kèm trình đơn lọc
Đặt đoạn này bên trong <div rst-list>.
<div rst-lbar >
<search >
<form rst-search method ="get" action ="/posts" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="11" cy ="11" r ="8" /><path d ="m21 21-4.3-4.3" /></svg >
<input type ="search" name ="q" value ="release" placeholder ="Tìm bài viết" aria-label ="Tìm bài viết" >
<a rst-search-clear href ="/posts?sort=newest" aria-label ="Xóa tìm kiếm" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="M18 6 6 18" /><path d ="m6 6 12 12" /></svg >
</a >
<input type ="hidden" name ="sort" value ="newest" >
<button class ="rst-sr-only" type ="submit" >Tìm kiếm</button >
</form >
</search >
<details rst-dropdown name ="rst-menus" >
<summary rst-btn aria-label ="Lọc theo trạng thái: Đã thanh toán" >
Đã thanh toán
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg >
</summary >
<div rst-dropdown-menu >
<a href ="/posts" >Tất cả</a >
<a href ="/posts?status=paid" aria-current ="true" >Đã thanh toán <svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="M20 6 9 17l-5-5" /></svg ></a >
<a href ="/posts?status=free" >Miễn phí</a >
</div >
</details >
</div >
Trong một ứng dụng, phần này sẽ đi tới /posts, /posts?sort=newest, /posts?status=free, /posts?status=paid. Ở đây các liên kết và biểu mẫu của nó không dẫn đến đâu.