Chip
Leave feedbackChips are compact elements that represent an input, attribute, or action. Similar to the Badge component, but interactive.
Basic Usage
Any Paragon component or export may be added to the code example.
With Icon Before and After
Any Paragon component or export may be added to the code example.
Chip Carousel
Any Paragon component or export may be added to the code example.
Theme Variables (SCSS)#
$chip-padding-x: .5rem !default;$chip-padding-y: .125rem !default;$chip-padding-to-icon: 3px !default;$chip-icon-padding: .25rem !default;$chip-margin: .125rem !default;$chip-border-radius: .25rem !default;$chip-disable-opacity: .3 !default;$chip-icon-size: 1.25rem !default;$chip-theme-variants: ("light": ("background": $light-500,"color": $black,),"dark": ("background": $dark-200,"color": $white,)) !default;
Props API#
- children
nodeRequiredSpecifies the content of the
Chip. - className
stringSpecifies an additional
classNameto add to the base element. - variant
enum'light' | 'dark'Default'light'The
Chipstyle variant to use. - disabled
boolDefaultfalseDisables the
Chip. - iconBefore
element|funcAn icon component to render before the content. Example import of a Paragon icon component:
import { Check } from '@edx/paragon/icons'; - onIconBeforeClick
funcA click handler for the
Chipicon before. - iconAfter
element|funcAn icon component to render before after the content. Example import of a Paragon icon component:
import { Check } from '@edx/paragon/icons'; - onIconAfterClick
funcA click handler for the
Chipicon after.
Usage Insights#
Chip
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-learner-dashboard | 20.32.0 | 2 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 3 |