InlineLinks
A wrapping row of links joined by a separator.
Overview
A footer or a row of related links: Privacy, Terms, Contact.
Footer
Do
import { InlineLinks, TextLink } from "@hackcove/ui";
<InlineLinks>
<TextLink href="#privacy">Privacy</TextLink>
<TextLink href="#terms">Terms</TextLink>
<TextLink href="#contact">Contact</TextLink>
</InlineLinks>InlineLinks: it spaces them, wraps them and hides the separator from a screen reader.Don't
import { Body, TextLink } from "@hackcove/ui";
<Body as="p">
<TextLink href="#privacy">Privacy</TextLink> | <TextLink href="#terms">Terms</TextLink> |{" "}
<TextLink href="#contact">Contact</TextLink>
</Body>Usage
- Put one
TextLinkper child. The row wraps and spaces them. separatoris·(default),•ornone.- Never type the separators yourself: they wrap onto the end of a line and a screen reader reads them.
- A row of facts that are not links is a
MetaList.
Accessibility
- The separators are
aria-hiddenand lead every link but the first, held to their link so a wrap never leaves one at the end of a line. - Each link keeps its own focus ring; the row adds no extra tab stop.
aria-*anddata-*go on the root.
API
InlineLinks
A wrapping row of links, small text, joined by a separator. The separator is aria-hidden and leads each link but the first, held to its link so a wrap never leaves one at a line's end.
separator- Type
"none" | "·" | "•"- Default
·