feat(chip): add outlined version#17452
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “outlined” visual variant for the Chip component by introducing an outlined API input, wiring the corresponding BEM modifier class, and extending the chip theme styles (including outlined-specific hover/focus/disabled rules). The PR also updates focus-ring styling to use shadow tokens and adds a unit test asserting the outlined class application.
Changes:
- Introduces
@Input() outlinedonIgxChipComponentand binds it toigx-chip--outlined. - Adds the
outlinedmodifier to the chip component SCSS and defines the outlined styling in the chip theme SCSS. - Adds a unit test validating the outlined class is applied when the input is
true.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| projects/igniteui-angular/core/src/core/styles/components/chip/_chip-theme.scss | Adds outlined chip styling, adjusts focus/hover/disabled styling, and updates focus-shadow token usage. |
| projects/igniteui-angular/core/src/core/styles/components/chip/_chip-component.scss | Registers the outlined BEM modifier so the theme placeholder can be extended. |
| projects/igniteui-angular/chips/src/chips/chip.component.ts | Adds the public outlined input and host class binding. |
| projects/igniteui-angular/chips/src/chips/chip.spec.ts | Adds a unit test asserting igx-chip--outlined class application. |
Comments suppressed due to low confidence (2)
projects/igniteui-angular/core/src/core/styles/components/chip/_chip-theme.scss:298
- There is trailing whitespace on the blank line before the
&%igx-chip--disabledblock in the primary outlined styles. This can fail stylelintno-eol-whitespace.
}
&%igx-chip--disabled {
projects/igniteui-angular/core/src/core/styles/components/chip/_chip-theme.scss:857
- There is trailing whitespace on the blank line between the disabled outlined base item styles and the disabled selected styles. This can fail stylelint rules like
no-eol-whitespace.
}
%igx-chip__item--selected {
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
projects/igniteui-angular/chips/src/chips/chip.component.ts:238
- PR description says it closes issue #591, but the referenced issue is about an Avatar ripple overflow, while this PR changes Chip styling/API (outlined variant). Please update the PR description/linked issue(s) so the tracking is accurate (either link the correct chip-related issue or remove the close directive).
/**
* Sets/gets whether the chip is outlined.
* Default value is `false`.
*
* @example
* ```html
* <igx-chip outlined></igx-chip>
* ```
*/
@Input({transform: booleanAttribute})
@HostBinding('class.igx-chip--outlined')
public outlined = false;
| * <igx-chip outlined></igx-chip> | ||
| * ``` | ||
| */ | ||
| @Input({transform: booleanAttribute}) |
| @if $variant == 'indigo' { | ||
| color: if($theme-variant == 'light', color($color: 'gray', $variant: 900), contrast-color($color: 'error', $variant: 900)); | ||
| background: transparent; | ||
| opacity: .4; | ||
| } |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
projects/igniteui-angular/chips/src/chips/chip.component.ts:236
- Decorator formatting is inconsistent with the rest of the file (missing spaces inside the
@Inputoptions object). Keeping the same spacing style improves readability and reduces noisy diffs.
@Input({transform: booleanAttribute})
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
projects/igniteui-angular/core/src/core/styles/components/chip/_chip-theme.scss:941
- In the disabled + outlined indigo branch, the text color uses
contrast-color($color: 'error', ...), which looks like a copy/paste mistake (it applies to primary/info/success/warning/danger chips). This makes disabled outlined chips depend on theerrorpalette unexpectedly.
@if $variant == 'indigo' {
color: if($theme-variant == 'light', color($color: 'gray', $variant: 900), contrast-color($color: 'error', $variant: 900));
background: transparent;
opacity: .4;
projects/igniteui-angular/core/src/core/styles/components/chip/_chip-theme.scss:33
- Same as above for
focus-selected-shadow-color: without a fallback, older theme maps that only definefocus-selected-outline-colorcould generate an invalid box-shadow value.
$box-shadow-focus-selected: map.get((
'material': null,
'fluent': null,
'bootstrap': 0 0 0 rem(4px) var-get($theme, 'focus-selected-shadow-color'),
'indigo': 0 0 0 rem(3px) var-get($theme, 'focus-selected-shadow-color')
projects/igniteui-angular/chips/src/chips/chip.component.ts:236
- Formatting is inconsistent with the surrounding inputs (missing spaces inside the object literal).
@Input({transform: booleanAttribute})
| $box-shadow-focus: map.get(( | ||
| 'material': null, | ||
| 'fluent': null, | ||
| 'bootstrap': 0 0 0 rem(4px) var-get($theme, 'focus-outline-color'), | ||
| 'indigo': 0 0 0 rem(3px) var-get($theme, 'focus-outline-color') | ||
| 'bootstrap': 0 0 0 rem(4px) var-get($theme, 'focus-shadow-color'), | ||
| 'indigo': 0 0 0 rem(3px) var-get($theme, 'focus-shadow-color') |
| <igx-chip | ||
| #outlinedChip | ||
| [variant]="properties.variant" | ||
| [igSize]="properties.size" | ||
| [disabled]="properties.disabled" |
|
Material The Outlined disabled chip for all variants ( Default, Primary, Info, Success, Warning and Danger) shares the same colours as in the Outlined Default Disabled chip: Light Mode: Dark Mode: |
|
Indigo Light Mode
Background color: transparent Indigo Dark Mode
Background color: transparent |


Closes #591
Needs to be tested together with this theming PR: #592
The WC implementation is still a work in progress.
Description
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Chip
How Has This Been Tested?
Checklist: