Skip to content

Link

An inline link with an underline that follows the text colour; renders any element through the render prop.

Base UI0.8 kB gzipSource Registry JSON

Link playground

Props

Installation

npx shadcn@latest add https://sproutboat.com/ikada/r/link.json

The CLI writes components/ikada/link.tsx and merges the ikada theme into your CSS. Or take it from the package: import { Link } from "@sproutboat/ikada";

Usage

import { Link } from "@/components/ikada/link";

<Link href="/docs">
  Read the docs
</Link>

Examples

Inline

Read the deploy guide before moving robin to eu-west.

External

Opens in a new tab with a safe rel, shows an arrow, and tells screen readers.

Disabled

Props

LinkProps
PropTypeDescription
externalbooleanOpens in a new tab with a safe rel, shows an arrow and announces it. Default `false`.
renderReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.

Also takes every prop of useRender.ComponentProps<"a">.

Source: src/components/link.tsx