Skip to content

Link Component

The link-v1 component provides navigation links with built-in support for internal routing and scroll position preservation.

<link-v1 href="/about">About</link-v1>
<link-v1 href="https://example.com">External Link</link-v1>

Internal links automatically preserve scroll position when navigating:

<link-v1 href="/products" internal>View Products</link-v1>
AttributeTypeDefaultDescription
hrefstring-URL to navigate to
internalbooleanfalseWhether this is an internal link (enables scroll preservation)
targetstring-Link target (_blank, _self, etc.)

DS One automatically preserves scroll position when navigating between pages using internal links. This provides a better user experience when users navigate back.

<!-- Scroll position is preserved -->
<link-v1 href="/page1" internal>Page 1</link-v1>
<link-v1 href="/page2" internal>Page 2</link-v1>
<link-v1 href="https://github.com/jo4712/ds-one" target="_blank">
View on GitHub
</link-v1>
<link-v1 href="/documentation">
<icon-v1 name="open"></icon-v1>
Documentation
</link-v1>