import { Link } from "@chakra-ui/react"
export const LinkBasic = () => {
  return <Link href="#">Visit Chakra UI</Link>
}
import { Link } from "@chakra-ui/react"<Link href="...">Click here</Link>Use the variant prop to change the appearance of the Link component
import { Link, Stack } from "@chakra-ui/react"
export const LinkWithVariants = () => {
  return (
    <Stack>
      <Link variant="underline" href="#">
        Link (Underline)
      </Link>
      <Link variant="plain" href="#">
        Link (Plain)
      </Link>
    </Stack>
  )
}
Use Link within a text to create a hyperlink
Visit the Chakra UI website
import { Link, Text } from "@chakra-ui/react"
export const LinkWithinText = () => {
  return (
    <Text>
      Visit the{" "}
      <Link
        variant="underline"
        href="https://chakra-ui.com"
        colorPalette="teal"
      >
        Chakra UI
      </Link>{" "}
      website
    </Text>
  )
}
Add an external link icon to the Link component
import { Link } from "@chakra-ui/react"
import { LuExternalLink } from "react-icons/lu"
export const LinkWithExternal = () => {
  return (
    <Link href="#">
      Visit Chakra UI <LuExternalLink />
    </Link>
  )
}
Compose Link with Next.js Link component using the asChild prop
import { Link as ChakraLink } from "@chakra-ui/react"
import NextLink from "next/link"
const Demo = () => {
  return (
    <ChakraLink asChild>
      <NextLink href="/about">Click here</NextLink>
    </ChakraLink>
  )
}| Prop | Default | Type | 
|---|---|---|
| colorPalette  | 'gray' | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'The color palette of the component | 
| variant  | 'plain' | 'underline' | 'plain'The variant of the component |