Catalogo design-system primitive

← catalogo / primitive

Catalyst · Link

CL-PR-15 Catalyst

catalyst/link

Anteprima disegnata disponibile solo per la versione html: questa e' javascript, sotto c'e' il sorgente.

Pacchetti da installare

@headlessui/reactreact

Sorgente (javascript)

/**
 * TODO: Update this component to use your client-side framework's link
 * component. We've provided examples of how to do this for Next.js, Remix, and
 * Inertia.js in the Catalyst documentation:
 *
 * https://catalyst.tailwindui.com/docs#client-side-router-integration
 */

import * as Headless from '@headlessui/react'
import React, { forwardRef } from 'react'

export const Link = forwardRef(function Link(props, ref) {
  return (
    <Headless.DataInteractive>
      <a {...props} ref={ref} />
    </Headless.DataInteractive>
  )
})