Components / Actions

TextLink

Inline accent link with an arrow, for 'see all' style actions beside headings.

Extracted fromMarketing site

Import

tsx
import { TextLink, SmartLink } from "@somnia-chain/ui"
// in a Next.js app, internal links use next/link:
import { TextLink, SmartLink } from "@somnia-chain/ui/next"

Examples

Internal and external

examples/text-link/default.tsxShow code
tsx
import { TextLink } from "@somnia-chain/ui"

export default function TextLinkExample() {
  return (
    <div className="flex flex-wrap gap-8">
      <TextLink href="#">The Somnia Platform</TextLink>
      <TextLink href="https://docs.somnia.network">Documentation</TextLink>
    </div>
  )
}

Props

TextLink

PropTypeDefaultDescription
hrefstring—Destination.
linkAsLinkComponent<a>Component for internal links. @somnia-chain/ui/next sets it to next/link.