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.28.5 | 12 | |
frontend-app-admin-portal | 20.26.3 | 18 | |
frontend-app-authn | 20.34.0 | 19 | |
frontend-app-communications | 20.30.1 | 1 | |
frontend-app-course-authoring | 20.32.0 | 8 | |
frontend-app-discussions | 20.15.0 | 3 | |
frontend-app-ecommerce | 20.32.0 | 1 | |
frontend-app-enterprise-public-catalog | 20.29.0 | 2 | |
frontend-app-gradebook | 19.25.4 | 2 | |
frontend-app-learner-dashboard | 20.32.0 | 7 | |
frontend-app-learner-portal-enterprise | 20.31.1 | 19 | |
frontend-app-learner-record | 20.32.0 | 6 | |
frontend-app-learning | 20.28.4 | 25 | |
frontend-app-library-authoring | 20.30.1 | 1 | |
frontend-app-ora-grading | 20.30.0 | 5 | |
frontend-app-payment | 20.18.2 | 5 | |
frontend-app-profile | 20.32.3 | 3 | |
frontend-app-publisher | 20.28.5 | 4 | |
frontend-app-support-tools | 20.26.0 | 8 | |
frontend-lib-content-components | 20.32.0 | 9 | |
frontend-lib-special-exams | 20.22.4 | 4 | |
prospectus | 20.32.3 | 2 | |
studio-frontend | 3.4.8 | 4 |