Hyperlink
minimal usage
Any Paragon component or export may be added to the code example.
with blank target
Any Paragon component or export may be added to the code example.
blank target without Icon
Any Paragon component or export may be added to the code example.
with onClick
Any Paragon component or export may be added to the code example.
with icon
Any Paragon component or export may be added to the code example.
color variants
Any Paragon component or export may be added to the code example.
link variants
Any Paragon component or export may be added to the code example.
Props API#
- 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.
Usage Insights#
Hyperlink
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
edx-platform | 2.6.4 | 2 | |
frontend-app-account | 20.46.3 | 11 | |
frontend-app-admin-portal | 20.46.3 | 32 | |
frontend-app-authn | 20.46.2 | 23 | |
frontend-app-communications | 20.46.2 | 1 | |
frontend-app-course-authoring | 20.46.2 | 26 | |
frontend-app-discussions | 20.44.0 | 1 | |
frontend-app-ecommerce | 20.46.2 | 3 | |
frontend-app-enterprise-public-catalog | 20.46.3 | 2 | |
frontend-app-gradebook | 20.45.0 | 2 | |
frontend-app-learner-dashboard | 20.46.2 | 9 | |
frontend-app-learner-portal-enterprise | 20.45.4 | 23 | |
frontend-app-learner-record | 20.46.3 | 9 | |
frontend-app-learning | 20.46.0 | 25 | |
frontend-app-ora-grading | 20.46.3 | 5 | |
frontend-app-payment | 20.46.2 | 8 | |
frontend-app-profile | 20.46.3 | 2 | |
frontend-app-publisher | 20.46.2 | 6 | |
frontend-app-support-tools | 20.46.0 | 11 | |
frontend-component-header-edx | 21.5.6 | 3 | |
frontend-lib-content-components | 21.5.6 | 9 | |
frontend-lib-special-exams | 20.44.0 | 4 | |
prospectus | 20.46.2 | 3 | |
studio-frontend | 3.4.8 | 4 |