Skip to content

refactor: use color for intent and variant for style - #976

Merged
rohanchkrabrty merged 3 commits into
mainfrom
refactor/color-intent
Nov 5, 2026
Merged

rohanchkrabrty merged 3 commits into
mainfrom
refactor/color-intent

Conversation

@rohanchkrabrty

Copy link
Copy Markdown
Contributor

Summary

  • color holds the intent and variant holds only the visual style. Badge, Indicator, Text, Link, AnnouncementBar and the DataView.Timeline markers move variant to color. Callout moves type to color and keeps variant (solid, outline).
  • Each intent has one name: warning becomes attention (Badge, Indicator, Chip), alert and error become danger (Callout, AnnouncementBar), and grey, normal and default become neutral (Callout, AnnouncementBar, timeline markers). Callout normal becomes primary.
  • Spinner color="default" becomes color="inherit". Separator color also takes emphasis, accent, attention, danger and success.
  • Updates every usage in the library, the docs pages, demos, playgrounds and Figma Code Connect templates, and adds an upgrading section with the old and new values.

Part of #650.

Breaking change: see the "color holds the intent" section of the upgrading page.

Choices made in this PR:

  • Default values keep today's look: Callout color="neutral" with variant="solid", AnnouncementBar color="neutral", Link color="accent", Badge and Indicator color="accent", Spinner color="neutral".
  • Separator intent colors use the --rs-color-border-<intent>-primary tokens, and emphasis uses --rs-color-border-base-emphasis.
  • The timeline marker line sets data-color in place of data-variant.
  • Toast type="warning" is a Base UI toast type, so it does not change.
  • The CalendarPreview page used type="info" and type="warn" on four callouts. Callout never had these values, so the callouts had no background. They now use color="neutral" and color="attention".
  • docs/V1-migration.md and the RFCs keep the old names, because they record past releases.

Left out: Badge and Separator sizes, which #975 changes, and the Badge and Callout icon rename, which is a separate change.

Badge, Indicator, Text, Link, AnnouncementBar and timeline markers move variant to color. Callout moves type to color and keeps variant. warning becomes attention, alert and error become danger, and grey, normal and default become neutral (Callout normal becomes primary). Spinner default becomes inherit. Separator color takes emphasis and the intents.
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
apsara Error Error Nov 5, 2026 7:53pm UTC

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 111 files, which is 11 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8b0aea74-fc4e-4519-b2c7-97811772a757
Commits

Reviewing files that changed from the base of the PR and between a835520 and d29e319.

Files selected for processing: 111

  • apps/www/src/app/examples/page.tsx
  • apps/www/src/app/examples/timeline-stress/page.tsx
  • apps/www/src/components/dataview-demo.tsx
  • apps/www/src/components/demo/demo-controls.tsx
  • apps/www/src/components/kbd/kbd.tsx
  • apps/www/src/components/linear-menu-demo.tsx
  • apps/www/src/components/mdx/mdx-components.tsx
  • apps/www/src/components/tag/tag.tsx
  • apps/www/src/components/theme-panel-demo.tsx
  • apps/www/src/components/tour-demo.tsx
  • apps/www/src/content/docs/(overview)/upgrading.mdx
  • apps/www/src/content/docs/ai-elements/chat-panel/demo.ts
  • apps/www/src/content/docs/ai-elements/chat/demo.ts
  • apps/www/src/content/docs/ai-elements/prompt-input/demo.ts
  • apps/www/src/content/docs/ai-elements/reasoning/demo.ts
  • apps/www/src/content/docs/components/announcement-bar/demo.ts
  • apps/www/src/content/docs/components/announcement-bar/index.mdx
  • apps/www/src/content/docs/components/announcement-bar/props.ts
  • apps/www/src/content/docs/components/badge/demo.ts
  • apps/www/src/content/docs/components/badge/index.mdx
  • apps/www/src/content/docs/components/badge/props.ts
  • apps/www/src/content/docs/components/calendar-preview/demo.ts
  • apps/www/src/content/docs/components/calendar-preview/index.mdx
  • apps/www/src/content/docs/components/calendar/demo.ts
  • apps/www/src/content/docs/components/callout/demo.ts
  • apps/www/src/content/docs/components/callout/index.mdx
  • apps/www/src/content/docs/components/callout/props.ts
  • apps/www/src/content/docs/components/chip/demo.ts
  • apps/www/src/content/docs/components/chip/index.mdx
  • apps/www/src/content/docs/components/chip/props.ts
  • apps/www/src/content/docs/components/context-menu/demo.ts
  • apps/www/src/content/docs/components/drawer/demo.ts
  • apps/www/src/content/docs/components/filter-chip/demo.ts
  • apps/www/src/content/docs/components/indicator/demo.ts
  • apps/www/src/content/docs/components/indicator/index.mdx
  • apps/www/src/content/docs/components/indicator/props.ts
  • apps/www/src/content/docs/components/kbd/demo.ts
  • apps/www/src/content/docs/components/link/demo.ts
  • apps/www/src/content/docs/components/link/index.mdx
  • apps/www/src/content/docs/components/link/props.ts
  • apps/www/src/content/docs/components/menu/demo.ts
  • apps/www/src/content/docs/components/number-field/demo.ts
  • apps/www/src/content/docs/components/popover/demo.ts
  • apps/www/src/content/docs/components/radio/demo.ts
  • apps/www/src/content/docs/components/scroll-area/demo.ts
  • apps/www/src/content/docs/components/separator/demo.ts
  • apps/www/src/content/docs/components/separator/index.mdx
  • apps/www/src/content/docs/components/separator/props.ts
  • apps/www/src/content/docs/components/spinner/demo.ts
  • apps/www/src/content/docs/components/spinner/index.mdx
  • apps/www/src/content/docs/components/spinner/props.ts
  • apps/www/src/content/docs/components/text/demo.ts
  • apps/www/src/content/docs/components/text/index.mdx
  • apps/www/src/content/docs/components/text/props.ts
  • apps/www/src/content/docs/components/tour/index.mdx
  • apps/www/src/content/docs/dataview/demo.ts
  • apps/www/src/content/docs/dataview/props.ts
  • apps/www/src/content/docs/dataview/timeline.mdx
  • apps/www/src/content/docs/theme/icons/demo.ts
  • apps/www/src/content/docs/theme/icons/index.mdx
  • apps/www/src/content/docs/theme/overview/demo.ts
  • packages/react/components/announcement-bar/__tests__/announcement-bar.test.tsx
  • packages/react/components/announcement-bar/announcement-bar.module.css
  • packages/react/components/announcement-bar/announcement-bar.tsx
  • packages/react/components/badge/__tests__/badge.test.tsx
  • packages/react/components/badge/badge.module.css
  • packages/react/components/badge/badge.tsx
  • packages/react/components/button/button.tsx
  • packages/react/components/calendar-preview/calendar-preview-footer.tsx
  • packages/react/components/callout/__tests__/callout.test.tsx
  • packages/react/components/callout/callout.module.css
  • packages/react/components/callout/callout.tsx
  • packages/react/components/chip/__tests__/chip.test.tsx
  • packages/react/components/chip/chip.module.css
  • packages/react/components/chip/chip.tsx
  • packages/react/components/data-table/components/content.tsx
  • packages/react/components/data-table/components/display-properties.tsx
  • packages/react/components/data-table/components/grouping.tsx
  • packages/react/components/data-table/components/ordering.tsx
  • packages/react/components/data-table/components/virtualized-content.tsx
  • packages/react/components/data-view/__tests__/timeline.test.tsx
  • packages/react/components/data-view/components/display-properties.tsx
  • packages/react/components/data-view/components/grouping.tsx
  • packages/react/components/data-view/components/list.tsx
  • packages/react/components/data-view/components/ordering.tsx
  • packages/react/components/data-view/components/timeline.tsx
  • packages/react/components/data-view/data-view.module.css
  • packages/react/components/data-view/data-view.types.tsx
  • packages/react/components/filter-chip/filter-chip-operation.tsx
  • packages/react/components/icon-button/icon-button.tsx
  • packages/react/components/indicator/__tests__/indicator.test.tsx
  • packages/react/components/indicator/indicator.module.css
  • packages/react/components/indicator/indicator.tsx
  • packages/react/components/link/link.tsx
  • packages/react/components/message/message-bubble.tsx
  • packages/react/components/prompt-input/prompt-input-submit.tsx
  • packages/react/components/separator/__tests__/separator.test.tsx
  • packages/react/components/separator/separator.module.css
  • packages/react/components/separator/separator.tsx
  • packages/react/components/spinner/spinner.module.css
  • packages/react/components/spinner/spinner.tsx
  • packages/react/components/text/__tests__/text.test.tsx
  • packages/react/components/text/text.module.css
  • packages/react/components/text/text.tsx
  • packages/react/components/toast/toast-root.tsx
  • packages/react/components/tour/tour-parts.tsx
  • packages/react/figma/announcement-bar.figma.ts
  • packages/react/figma/badge.figma.ts
  • packages/react/figma/callout.figma.ts
  • packages/react/figma/callout.figma.tsx
  • packages/react/figma/indicator.figma.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@976

commit: 1e092c8

Comment thread packages/react/components/text/text.tsx Resolved
# Conflicts:
#	apps/www/src/content/docs/(overview)/upgrading.mdx
#	packages/react/components/indicator/indicator.tsx
@rohanchkrabrty
rohanchkrabrty merged commit b4b9aba into main Nov 5, 2026
6 of 7 checks passed
@rohanchkrabrty
rohanchkrabrty deleted the refactor/color-intent branch November 5, 2026 19:51

This branch had an error being deployed

1 failed deployment
Preview — d29e319e Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants