Surfaces that hold things (Card, Alert, Avatar, Aspect Ratio), things that open and shut (Accordion, Collapsible, Carousel), and Breadcrumb, Checkbox and the reading direction.
Card
A framed box. One line with title= and description=, or built from its parts.
One linetitle and description are the heading; children go under it.
Team planFive seats, billed monthly.
Renews on the first of each month.Active
All partsCardHeader holds CardTitle, CardDescription and CardAction (at the far side); then CardContent and CardFooter.
Login to your accountEnter your email below to login.
The card said
nothing yet
Sizessize="sm" pads 16 instead of 24 and closes the gaps. The parts are the same.
Team · size="default"Five seats. Padded 24.
Chosen
Everything in the kit, shared by five.
Solo · size="sm"One seat. Padded 16.
Everything in the kit, for one.
plan: Team
Accordion
Headings that open what is under them. The page holds what is open and gives it to each trigger and content.
One lineAccordion title= is one item that opens by itself (the browser's details). open starts it open.
What is in the box?
The thing, a cable, and a card.
Can I send it back?
Within thirty days, in the box it came in.
Open from the start
Because it says open.
Single, collapsibleA string says which is open; "" when the open one is closed again. The last item is disabled.
Two to four days, in a box that fits through the door.
Within thirty days. The label is in the box.
Two years, parts and work.
Not reachable.
faq
"ship"
Single, one stays openWithout collapsible, pressing the open one does nothing.
One of these is always open.
Pressing the open one does nothing.
fixedFaq
"x"
MultipleA list of the open values; each trigger says type="multiple".
Choose what you hear about.
Choose who sees what.
Choose how you pay.
faqs
["a"]
Collapsible
One flag, given to each part: the frame, what flips it, and what it shows.
Trigger and contentCollapsibleTrigger is a bare button around whatever is inside; the content's height runs open and shut.
@ada starred 3 repositories
mote/compiler
mote/runtime
mote/kit
more: false
Any button, and a disabled triggerThe flag is the page's, so a Button may flip it. A trigger with disabled=true does not.
Order#4471Placed12 NovemberCarrierPost, tracked
details: false
Alert
A note in the page's flow, with role=alert. The icon is its own: info, or circle-alert when destructive.
One lineAlert title= with the words under it, in either variant.
Heads up
A new version is out. Nothing you have typed is lost.
Payment failed
The card was declined. Try another.
PartsAlertTitle, AlertDescription, and AlertAction at the far side. icon=false leaves the icon out.
A new version is ready
Reload to get it. Nothing you have typed is lost.
Your session has expired
Sign in again to carry on where you left off.
icon=false, and one of the page's own in the title
The description may hold any markup.
Aspect Ratio and Avatar
Aspect RatioA box that keeps its shape at any width and clips what is inside. Left out, the ratio is 1.
ratio=(16 / 9)
1
16 / 9
9 / 16
Avatar in one linename gives the initials; src the picture. size is sm (24), default (32), lg (40) or a number of pixels.
name, and name with src
AL
A
KC
size: sm, default, lg, 56
AL
AL
AL
AL
Avatar partsAvatarImage shows once loaded; if it never does, the AvatarFallback stays. AvatarBadge is a mark at the corner.
AL
image
NB
fallback
GH
online
HK
icon badge
AT
size=56
OnlineRecolours the third avatar's badge
Avatar groupEach overlaps the one before by 8. The group and its avatars are each told the size, and each avatar its ring.
AL
AT
+3
sm
AL
+3
default
GH
lg, an icon as the count
Breadcrumb
Where the reader is, as a trail of links: a nav holding a list.
A trailBreadcrumbLink for each step back, BreadcrumbPage for the last, a BreadcrumbSeparator between. Press a link to go up.
depth 5 of 5
Ellipsis and a separator of the page's ownBreadcrumbEllipsis stands for a folded middle; in a Button it opens a menu. plain=true takes the chevron out for another mark.
from the menu: nothing yet
Carousel
Slides on a strip. The parts share one json value the page holds (api=), which then says where it is (index, progress, pages, count) and goes where index is set to. Swipe, drag, press the arrows, or focus it and use the arrow keys, Home and End.
One at a timeA slide is the whole width unless basis says otherwise. The arrows are disabled at the ends.
Dawn
Noon
Dusk
Night
Mist
Slide 1 of 5
Several at oncebasis="1/3" shows three; a turn then moves a screenful, so seven slides are three screens.
1
2
3
4
5
6
7
Screen 1 of 3 · 7 slides
Verticalorientation="vertical": the strip is given a height, and the arrows sit above and below.
Make it work.
Make it right.
Make it fast.
Then stop.
Write it down.
Go outside.
Screen 1 of 3
Set, and slides that come and gocar.index is the page's to set, and to read; car.progress follows the finger (the bar). A slide added before the one shown leaves it where it is.
A
B
C
Slide 2 of 3; pressed nothing yet
LoopWith loop, next from the last slide is the first, and the arrows are never disabled.
A
B
C
Slide 1 of 3
Checkbox
The browser's checkbox with the kit's drawing: Space toggles it, a press on its label does too.
Stateschecked is written back. invalid draws it in the danger colour; disabled dims it and it cannot be changed.
Select allindeterminate draws a dash while only some are checked (and says aria-checked="mixed").
Checked
1 of 3: Compiler
Direction
DirectionProvider sets the reading direction for what is inside. The kit lays out by start and end, so it follows.
DirectionProviderThe same markup both ways: icons lead, actions trail, groups and checkboxes turn round. A component cannot read the direction, so the breadcrumb's mark is chosen by the page.
dir="rtl"
تم استلام الدفعة
The icon leads and the action trails, whichever way the page reads
الإشعاراتThe action sits at the far side of the header
٣
AL
آدا لوفلايسThe badge is at the avatar's end corner