Conversation
🦋 Changeset detectedLatest commit: 375b519 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
Hey @lukasoppermann @ericwbailey 👋 |
|
Can't speak to the code or overall plan, but some high-level considerations that we'll have to contend with at some point:
|
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
Thanks for the review @ericwbailey! Addressed:
|
|
@copilot in the Playground storybook story, add toggles for the icon Also add a story that does not use any of the internal components and just adds some custom content to the card |
lukasoppermann
left a comment
There was a problem hiding this comment.
@liuliu-dev design wise:
- heading, please use
--text-title-shorthand-small - for body copy:
--text-body-shorthand-medium - for the gap please use a variable from the stack: https://primer.style/product/primitives/size/#stack
I think we can remove the fallback values, they are not needed and don't exist anymore.
Agent-Logs-Url: https://github.com/primer/react/sessions/68b1fedd-5be4-41d5-be1b-87618778b53c Co-authored-by: lukasoppermann <813754+lukasoppermann@users.noreply.github.com>
Done in 375b519.
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@liuliu-dev should we tie the padding to the content-top, instead of icon bottom?
|
|
Uh oh! @lukasoppermann, at least one image you shared is missing helpful alt text. Check #7723 (comment) to fix the following violations:
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
|
This is also a use case: https://primer-1b76de82d9-13348165.drafts.github.io/storybook/?path=/story/components-card--custom-content
I am wondering if we should expect users to "bring their own padding" or if we should have a padding inside the card by default and a prop or a way to easily remove the default padding? CC: @siddharthkp ? |
|
Uh oh! @lukasoppermann, at least one image you shared is missing helpful alt text. Check #7723 (comment) to fix the following violations:
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
Amazing! Thank you so much! |


Upstream the Card component from
Pacerinto@primer/react.Issue: https://github.com/github/primer/issues/6467
Changelog
New
Card— A styled container component with border, box-shadow, and border-radius; also supports custom content without subcomponents (plain container mode)Card.Icon— Renders a decorative icon in the card header (defaults toaria-hidden, supportsaria-labelfor meaningful icons)Card.Image— Renders an edge-to-edge image in the card headerCard.Heading— Renders a heading (defaults to h3, configurable viaasprop)Card.Description— Renders a description below the headingCard.Menu— Slot for overlay menu (positioned absolute top-right)Card.Metadata— Renders metadata content below the descriptionChanged
PlaygroundStorybook story updated with boolean toggle controls forCard.IconandCard.MetadataCustomContentStorybook story added to demonstrate usingCardas a plain styled container with arbitrary children (no subcomponents)Rollout strategy
Testing & Reviewing
Merge checklist