feat(card-container): add visual container atom#257
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new CardContainer atom to the design system as a token-backed, non-interactive visual surface, and wires it into the public package exports and design documentation.
Changes:
- Introduces
CardContainer(types/hook/component/tests/stories) with variants for surface style, padding, radius, hover lift, and optional glassbackdropBlur. - Extends theme tokens with card backdrop colors, hover glow shadow tokens, and card blur levels.
- Updates docs (DESIGN + COMPONENTS, EN/ES) to document the new frosted/glass card guidance, and exports
CardContainerfromsrc/index.ts.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/theme.css | Adds card backdrop, hover glow, and blur tokens used by CardContainer variants. |
| src/index.ts | Exports CardContainer from the package entrypoint. |
| src/components/atoms/icon-button/useIconButton.ts | Ref typing adjustment for the button ref (see review comments re: nullability/cast). |
| src/components/atoms/card-container/useCardContainer.ts | Hook that maps props to native div props + variant className. |
| src/components/atoms/card-container/types.ts | CVA variants + public prop types/defaults for CardContainer. |
| src/components/atoms/card-container/index.ts | Barrel export for the atom and its types. |
| src/components/atoms/card-container/CardContainer.tsx | Stateless component wrapper that applies hook output to a <div>. |
| src/components/atoms/card-container/CardContainer.test.tsx | Hook + component behavior tests for passthrough props and variants. |
| src/components/atoms/card-container/CardContainer.stories.tsx | Storybook coverage for defaults, variants, spacing, radius, hover, blur, semantics, nested content. |
| src/components/atoms/button/useButton.ts | Ref typing adjustment for the button ref (see review comments re: nullability/cast). |
| docs/DESIGN.md | Documents new card-backdrop-bg and updated frosted/glass guidance (ES). |
| docs/DESIGN.en.md | Documents new card-backdrop-bg and updated frosted/glass guidance (EN). |
| docs/COMPONENTS.md | Updates system rules/examples around frosted cards and blur usage (ES). |
| docs/COMPONENTS.en.md | Updates system rules/examples around frosted cards and blur usage (EN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CardContaineratom as a visual, non-interactive container with the project 6-file component pattern.backdropBlurvariants backed by design tokens.backdropBlurstory over a single gray block to comparesm,md, andlg.Closes #17
Review scope
src/components/atoms/card-container/*,src/styles/theme.css,src/index.ts, component/design docs.Type of change
Workflow gates
Closes #NNNor maintainer approved an exception.status:approvedbefore implementation starts.In progress, branch/worktree recorded.<type>(<optional scope>): <description>..playwright-mcp,page-*.png,page-*.jpeg,*.md.playwright-output.Component evidence (required for component changes)
types.ts,use*.ts,Component.tsx,Component.test.tsx,Component.stories.tsx,index.ts.types.ts; JSX component has no state, CVA calls, or business logic.@defaultJSDoc intypes.ts(node scripts/verify-prop-default-docs.mjs).theme.css; no hardcoded colors or arbitrary color utilities in the component implementation. The Storybook-only gray block is intentionally illustrative.Accessibility evidence
CardContaineris intentionally non-interactive.Validation evidence
pnpm build✅; commit hooktypecheck✅pnpm exec vitest run src/components/atoms/card-container/CardContainer.test.tsx✅ (22 tests);pnpm test✅ (560 tests)pnpm build✅;pnpm run verify:package✅pnpm storybook-build✅; Playwright visual review ofatoms-cardcontainer--backdrop-blur✅Screenshots or recordings
Visual review was performed locally against the built Storybook
BackdropBlurstory; transient Playwright artifacts were cleaned before commit.Notes for reviewer
backdropBluruses CSSbackdrop-filter, so it blurs what is behind the card. Normal document-flow content cards should keepbackdropBlur="none".