Skip to content

docs: update component prop naming with variant docs - #8289

Open
joshblack wants to merge 1 commit into
docs/update-style-guidefrom
docs/add-variant-naming-docs
Open

docs: update component prop naming with variant docs#8289
joshblack wants to merge 1 commit into
docs/update-style-guidefrom
docs/add-variant-naming-docs

Conversation

@joshblack

@joshblack joshblack commented Aug 11, 2026

Copy link
Copy Markdown
Member

Part of: https://github.com/github/primer/issues/6737

Changelog

New

  • Add two guidelines for using the variant prop to the style guide skill

Changed

Removed

Rollout strategy

  • None; if selected, include a brief description as to why

This is a change to docs

@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b73b72e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the staff Author is a staff member label Aug 11, 2026
@joshblack joshblack added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Aug 11, 2026
@joshblack
joshblack marked this pull request as ready for review August 11, 2026 17:48
@joshblack
joshblack requested a review from a team as a code owner August 11, 2026 17:48
@joshblack
joshblack requested review from jonrohan and a lite review from Copilot August 11, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the style-guide documentation for Primer React component prop naming by adding explicit guidance on when to use the variant prop (semantic purpose) and when to avoid it (pure appearance).

Changes:

  • Add a guideline recommending variant values describe semantic purpose (e.g. info, warning) rather than colors.
  • Add a guideline discouraging variant for purely visual concerns like size/padding/shape, recommending more specific prop names instead.
Show a summary per file
File Description
.github/skills/style-guide/docs/component-prop-naming.md Adds two new documentation sections (and TOC entries) clarifying semantic vs appearance-driven usage of the variant prop.

Review details

Tip

Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Suppressed comments (1)

.github/skills/style-guide/docs/component-prop-naming.md:177

  • For consistency with other prop references in this doc, consider formatting variant as code here as well.
The variant prop is exclusively meant to communicate the purpose of a component.
It must not be used to communicate the appearance of a component. For example:
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread .github/skills/style-guide/docs/component-prop-naming.md
Comment thread .github/skills/style-guide/docs/component-prop-naming.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants