Repository navigation
Update UI Spinner appearance and add a color prop #83775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
9cbfe69
08d5f20
b636a91
9a90a9b
f83f0b0
742c92d
15e30d9
922e502
e45daa9
b12a653
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,20 +10,13 @@ | |
| overflow: visible; | ||
| opacity: 1; | ||
| background-color: transparent; | ||
| color: var(--wpds-color-foreground-content-neutral-weak); | ||
| } | ||
|
|
||
| .track, | ||
| .indicator { | ||
| fill: transparent; | ||
| stroke-width: 1.5px; | ||
| } | ||
|
|
||
| .track { | ||
| stroke: var(--wpds-color-background-track-neutral); | ||
| } | ||
|
|
||
| .indicator { | ||
| stroke: var(--wpds-color-background-thumb-brand); | ||
| stroke: currentColor; | ||
| stroke-width: var(--wpds-border-width-focus); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This matches what is currently used in the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd favor an appropriate token over maintaining appearance.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried the 2px version. It is kind of prominent in smaller sizes 🤔 Maybe that's fine. CleanShot.2026-09-30.at.16-00-19.mp4CleanShot.2026-09-30.at.16-01-19.mp4 |
||
| stroke-linecap: round; | ||
| transform-origin: 50% 50%; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import type { ComponentProps } from 'react'; | ||
|
|
||
| export type SpinnerProps = Omit< ComponentProps< 'svg' >, 'color' > & { | ||
| /** | ||
| * The spinner color. Accepts any CSS color value, including `currentColor` | ||
| * to inherit the surrounding text color. | ||
| * | ||
| * @default 'var(--wpds-color-foreground-content-neutral-weak)' | ||
| */ | ||
| color?: string; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the color being set, the spinner could become invisible in forced color mode. Should we give the indicator a system-color stroke in forced-colors mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed: