List
Bordered rows with a title, a description and a trailing note.
Default
-
Ada Lovelace
Editor
-
Grace Hopper
Reviewer
-
Alan Turing
Author
{ui list,
items: [
[
'title' => 'Ada Lovelace',
'description' => 'Editor',
'icon' => 'user',
],
[
'title' => 'Grace Hopper',
'description' => 'Reviewer',
'icon' => 'user',
],
[
'title' => 'Alan Turing',
'description' => 'Author',
'icon' => 'user',
],
],
/}
Each row is an item: title, description, icon and href. The title is a link when there is an href and plain text when there is not. The icon sits before the text. All of them are optional, so a row can be as short as a title.
The list is a ul of li, so a screen reader announces the number of rows.
From pages
-
Tabs
Links that swap a panel loaded from the server.
-
Pagination
Links to the pages of a long list.
-
Modal
A dialog that opens over the page, loaded from the server.
-
Toast
A short message that appears in the corner and goes away on its own.
-
Carousel
Slides in a row that scroll and snap.
-
Hero
The top of a page: a heading, a few lines and buttons, with an image beside them.
-
Navbar
A site's top bar: a brand, links with dropdowns, and actions, folding into a menu on small screens.
-
Calendar
A month of events laid out by day, with buttons to step between months.
-
Search
A search form with an input and a button, and room for a select before it.
-
Facets
Collapsible groups of checkboxes with counts, to filter a list of results.
-
Wizard
One step of a multi-step form, with the progress, the fields and Back and Next buttons.
{ui list, items: p('docs/ui/components')->children() /}
items takes pages as well as arrays, through the shared items() function. A page becomes its title, description and URL, so a list of a page's children is items: $page->children(), with no mapping in the template.
Strings
-
Backups
-
Mail
-
Search
{ui list, items: ['Backups', 'Mail', 'Search'] /}
A string is a row with only a title. A row's own items are not drawn here: for a tree, use a menu.