Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    Link

    Links allow users to navigate to a different location.

    View source code
    • Usage
    • Props

    Basic usage

    Spendesk

    <Link href="https://spendesk.com" isExternal>
      Spendesk
    </Link>
    

    Routing library

    The as prop is used to support a custom component, such as a react-router or Next.js link.

    import { Link as NextLink } from "next/link";
    
    const Demo = () => {
      return (
        <Link as={NextLink} href="/docs/components/button">
          Button
        </Link>
      );
    };
    
    import { Link as ReactRouterLink } from "react-router-dom";
    
    const Demo = () => {
      return (
        <Link as={ReactRouterLink} to="/help">
          Click Me
        </Link>
      );
    };
    

    Inside a Callout

    The Link component can be used inside other components, such as a Callout.

    You need to activate cost centers to enable Purchase Orders. Activate cost centers

    <Callout
      variant="warning"
      title={
        <p className="m-0">
          You need to activate cost centers to enable Purchase Orders.{" "}
          <Link href="https://spendesk.com" isExternal>
            Activate cost centers
          </Link>
        </p>
      }
    />