Hyperlink
minimal usage
with blank target
blank target without Icon
with onClick
with icon
color variants
link variants
- destination
string
Requiredspecifies the URL
- children
node
RequiredContent of the hyperlink
- className
string
Custom class names for the hyperlink
- target
string
Default'_self'specifies where the link should open. The default behavior is
_self
, which means that the URL will be loaded into the same browsing context as the current one. If the target is_blank
(opening a new window)rel='noopener'
will be added to the anchor tag to prevent any potential reverse tabnabbing attack. - onClick
func
Default() => {}specifies the callback function when the link is clicked
- externalLinkAlternativeText
isRequiredIf( PropTypes.string, props => props.target === '_blank', )
Default'in a new tab'specifies the text for links with a
_blank
target (which loads the URL in a new browsing context). - externalLinkTitle
isRequiredIf( PropTypes.string, props => props.target === '_blank', )
Default'Opens in a new tab'specifies the title for links with a
_blank
target (which loads the URL in a new browsing context). - variant
enum
'default' | 'muted' | 'brand'Default'default'type of hyperlink
- isInline
bool
Defaultfalsespecify the link style. By default it will be underlined.
- showLaunchIcon
bool
Defaulttruespecify if we need to show launch Icon. By default it will be visible.