Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.64 KB

File metadata and controls

48 lines (37 loc) · 1.64 KB

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'];

Link

{docs.exports.Link.description}

Events

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>

API