Skip to content

Components

IconLink

Component reference

Properties

Use IconLink

An icon-only link for navigation and downloads.

Example import style
icon-link.tsxTSX
"use client";

import { FloodRoot, IconLink } from "@flood-md/react";
import { ArrowRight } from "lucide-react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <IconLink href="/docs/installation" label="Read the installation guide">
        <ArrowRight />
      </IconLink>
    </FloodRoot>
  );
}

Design notes

  • Provide a destination or outcome in label and use a recognizable decorative icon. Use a text Link when the glyph alone would be ambiguous.
  • IconLink keeps native anchor behavior and shares target and glyph sizing with IconButton. Use IconButton for commands and IconLink for navigation or downloads.

API reference

PropValuesDefault
size"2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl""md"
hrefstringRequired
labelstringRequired
variantExclude<LinkProps["variant"], "text">"subtle"
iconSize"2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"size
Native HTML propsOmit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "variant" | "aria-label">Forwarded
View TypeScript source