Displays an svg icon from @edx/paragon/icons
. See Icons Foundation Documentation for a list of all available icons.
Basic Usage
Any Paragon component or export may be added to the code example.
With HTML attributes
HTML attributes can be passed to this component allowing for customization of the color, size, or addition of any necessary ARIA attributes.
Any Paragon component or export may be added to the code example.
Theme Variables (SCSS)#
$icon-inline: .8em !default;$icon-xs: 1rem !default;$icon-sm: 1.25rem !default;$icon-md: 1.5rem !default;$icon-lg: 1.75rem !default;
Props API#
- src
element
|func
DefaultnullAn icon component to render. Example import of a Paragon icon component:
import { Check } from '@edx/paragon/dist/icon';
- svgAttrs
shape
{aria-label:string
,aria-labelledby:}string
,Default{}HTML element attributes to pass through to the underlying svg element
- id
string
the
id
property of the Icon element, by default this value is generated with thenewId
function with theprefix
ofIcon
. - size
enum
'xs' | 'sm' | 'md' | 'lg'The size of the icon.
- className
string
A class name that will define what the Icon looks like.
- hidden
bool
Defaulttruea boolean that determines the value of
aria-hidden
attribute on the Icon span, this value istrue
by default. - screenReaderText
string
|element
a string or an element that will be used on a secondary span leveraging the
sr-only
style for screenreader only text, this value isundefined
by default. This value is recommended for use unless the Icon is being used in a way that is purely decorative or provides no additional context for screen reader users. This field should be thought of the same way analt
attribute would be used forimage
tags.
Usage Insights#
Icon
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
edx-platform | 2.6.4 | 15 | |
frontend-app-account | 20.46.3 | 6 | |
frontend-app-admin-portal | 20.46.3 | 70 | |
frontend-app-authn | 20.46.2 | 19 | |
frontend-app-communications | 20.46.2 | 13 | |
frontend-app-course-authoring | 20.46.2 | 53 | |
frontend-app-discussions | 20.44.0 | 43 | |
frontend-app-enterprise-public-catalog | 20.46.3 | 10 | |
frontend-app-gradebook | 20.45.0 | 12 | |
frontend-app-learner-dashboard | 20.46.2 | 9 | |
frontend-app-learner-portal-enterprise | 20.45.4 | 22 | |
frontend-app-learner-record | 20.46.3 | 4 | |
frontend-app-learning | 20.46.0 | 31 | |
frontend-app-library-authoring | 21.5.6 | 20 | |
frontend-app-ora-grading | 20.46.3 | 14 | |
frontend-app-payment | 20.46.2 | 1 | |
frontend-app-profile | 20.46.3 | 1 | |
frontend-app-publisher | 20.46.2 | 4 | |
frontend-app-support-tools | 20.46.0 | 7 | |
frontend-component-header-edx | 21.5.6 | 7 | |
catalog-search | 20.45.0 | 2 | |
frontend-lib-content-components | 21.5.6 | 49 | |
frontend-lib-special-exams | 20.44.0 | 3 | |
prospectus | 20.46.2 | 118 | |
studio-frontend | 3.4.8 | 5 |