Text Link

Semantic link for internal and external links

import { TextLink } from "@plexui/ui/components/TextLink";

Examples

Overview

Inline usage

You can use the responses endpoint to generate text. You can either use the API directly from an HTTP client of your choice, or use one of the official SDKs for your preferred language.

Default inheritance

colorClassName

You can use the responses endpoint to generate text. You can either use the API directly from an HTTP client of your choice, or use one of the official SDKs for your preferred language.

Primary color

Sample text with a primary link

Underline

Sample text with a subtle link

Font weight

Reference

PropTypeDefaultDescription
childrenReactNodeLink content
hrefstringURL
toobjectRouter link destination (internal)
primarybooleanfalsePrimary color, no default underline
underlinebooleantrueUnderline (default true unless primary)
forceExternalbooleanForce external link behavior
asComponentLink component (e.g. Next Link)

Configure your Router

Wrap your app in PlexUIProvider and pass your router's Link component. You can also pass the Link component to the as prop on TextLink for component-level override.

import { PlexUIProvider } from "@plexui/ui/components/PlexUIProvider"
import { Link } from "react-router"

export function App() {
  return (
    <PlexUIProvider linkComponent={Link}>
      ...
    </PlexUIProvider>
  )
}

<TextLink to={{ pathname: "/help" }} prefetch="intent">Get Help</TextLink>
import { Link } from "next/link"

<TextLink as={Link} href="/dashboard">View Dashboard</TextLink>