GoToPreviousSection
A link that takes users to the previous section of the current page.
A link that takes users to the previous section of the current page.
<a class="go-to-previous-section" href="#section-1" aria-label="Previous section: Introduction">← Previous: Introduction</a><GoToPreviousSection href="#section-1" label="Previous section: Introduction" />
// In your Svelte component:
import GoToPreviousSection from "lily-design-system-svelte-headless/components/GoToPreviousSection/GoToPreviousSection.svelte";
<GoToPreviousSection>
<!-- content -->
</GoToPreviousSection>
<GoToPreviousSection href="#section-1" label="Previous section: Introduction" />
href: string (required) — anchor URL of the previous section, typically #section-idlabel: string (required) — visible link textclassName: string (optional) — extra CSS classes appended to go-to-previous-sectionhref provides the destination, the link text provides the accessible nameGoToNextSection to give readers symmetric forward/back movement at the end of each section.BackLink for cross-page back navigation.ContentsNav or SectionNav instead.This headless component renders semantic HTML. The consumer provides all visual styling. No CSS, animations, or layout are included — the consumer composes those.
The component renders with .go-to-previous-section as the root class. No default styles are included.
go-to-next-section — a link that takes users to the next section of the current pagego-to-top — a link that returns users to the top of a long pagesection-nav — a navigation container for section navigation links.go-to-previous-section in css-style-sheet-template.css<a> with class go-to-previous-section linking to a section anchor on the same pagehref prop pointing at the previous section's anchor (e.g. #section-2)label prop for the visible link textGoToNextSection and GoToTopGenerated from this component's canonical metadata — the machine-checked source the implementations are held to.
href provides the destination, the link text provides the accessible namehref: string (required) — anchor URL of the previous section, typically #section-idlabel: string (required) — visible link textclassName: string (optional) — extra CSS classes appended to go-to-previous-section