ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(button):broken link + update docs to mention external links.

Open kevinmitch14 opened this issue 2 years ago • 2 comments

Button docs only mention using <Link> component and doesn't mention using <a> element for external links. It is recommended to use an <a> tag to link to external pages outside of your app. Framework-provided <Link> components from Next.js, Remix and Gatsby use client-side JavaScript to allow for client-side routing, whereas <a> does not.

From the Learn Next.js section, Note: If you need to link to an external page outside the Next.js app, just use an <a> tag without Link.

As this library is not solely for Next.js, should the use of <Link> be reduced in examples? <Link> components from other frameworks don't work exactly the same. Next.js: <Link href="/"> Remix + Gatsby: <Link to="/"> Astro: Native <a> element

Also, the asChild button example links to https://ui.shadcn.com/login which is a broken link. Decided to redirect to the github repo as an external link example, not using next/link.

This leads to poor UX and can also be detrimental for SEO, broken links indicate outdated content and lead to crawling/indexing issues.

Fixes #480

kevinmitch14 avatar May 29 '23 03:05 kevinmitch14

@kevinmitch14 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 29 '23 03:05 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2023 11:59pm

vercel[bot] avatar May 29 '23 23:05 vercel[bot]