Skip to main content

Link

Text hyperlink for navigating between pages or triggering actions.

Basic usage​

import { LhLink } from '@lh-ui/react'

export default function Demo() {
return (
<>
<LhLink href="/docs">Basic link</LhLink>
<LhLink href="/docs" type="primary">Primary link</LhLink>
<LhLink href="/docs" underline="always">Underline always</LhLink>
<LhLink href="/docs" disabled>Disabled link</LhLink>
</>
)
}
PropDescriptionTypeValuesDefault
typeSemantic type'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'—'default'
underlineUnderline mode'always' | 'hover' | 'none'—'hover'
disabledDisabled (renders as href-less anchor, blocks click and native navigation)boolean—false
hrefTarget URL (ignored when disabled)string——
prefixIconLeading icon nodeReactNode——
suffixIconTrailing icon nodeReactNode——
sxsx layout propsSxProps——

Other native anchor attributes (target, rel, download, …) are passed through to the root <a>.

EventDescriptionCallbackVue equivalent
onClickTriggered on click (blocked when disabled)(event: MouseEvent) => void@click
Accessibility

The disabled state keeps role="link" and outputs aria-disabled="true": screen readers still announce "link" while marking it unavailable. The focus ring is driven by the focus-ring token.

Styles​

import '@lh-ui/react/style/link'