import {Layout} from '../../src/Layout'; export default Layout;
import docs from 'docs:react-aria-components'; import {Link as VanillaLink} from 'vanilla-starter/Link'; import {Link as TailwindLink} from 'tailwind-starter/Link'; import tailwindDocs from 'docs:tailwind-starter/Link'; import '../../tailwind/tailwind.css';
export const tags = ['anchor', 'hyperlink', 'href'];
{docs.exports.Link.description}
Links with an href will be handled by the browser, or via a client side router. Links without an href will be rendered as a <span role="link"> instead of an <a>. Use the onPress event to handle user interaction.
"use client";
import {Link} from 'vanilla-starter/Link';
<Link onPress={() => alert('Pressed link')}>Link</Link>