Skip to content

[Sistent] Add Card component to the sistent components page#7582

Open
abhay1999 wants to merge 3 commits intolayer5io:masterfrom
abhay1999:add-card-component-docs
Open

[Sistent] Add Card component to the sistent components page#7582
abhay1999 wants to merge 3 commits intolayer5io:masterfrom
abhay1999:add-card-component-docs

Conversation

@abhay1999
Copy link
Copy Markdown

@abhay1999 abhay1999 commented Apr 3, 2026

Description

This PR adds the MDX documentation pages for the Card component to the Sistent components section of layer5.io, closing #7543.

The Card component is already part of the Sistent library (source) and is actively used across Meshery (e.g. user preferences page). These docs give it the same treatment as other components like Button and Paper.

Changes

Three files added under src/collections/sistent/components/card/:

  • index.mdx — Component overview: types (elevated vs outlined), elevation levels, interactivity, and corner options with live examples
  • guidance.mdx — When to use cards, content structure best practices, visual hierarchy guidance, interactivity rules, and accessibility notes
  • code.mdx — Runnable code examples: basic card, outlined variant, elevation, square corners, clickable card, and a card with header + action buttons

The structure and formatting follows the existing pattern used by Button and Paper.

Checklist

  • Follows the existing 3-file MDX structure (index, guidance, code)
  • Frontmatter includes name, title, published, component, and description
  • DCO sign-off included in commit
  • Live component examples use ThemeWrapper and CodeBlock as in other components

Signed-off-by: Abhay Chaurasiya abhaychaurasiya19@gmail.com

Adds the three-file MDX documentation structure for the Card component
under src/collections/sistent/components/card/, following the same
pattern used by existing components like Button and Paper.

- index.mdx: overview of card types (elevated, outlined), elevation
  levels, interactivity, and corner options
- guidance.mdx: when to use cards, content structure best practices,
  hierarchy guidance, interactivity rules, and accessibility notes
- code.mdx: runnable examples for basic card, outlined variant,
  elevation, square corners, clickable card, and card with header
  and actions

Fixes layer5io#7543

Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com>
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
The Card component was being used in the MDX examples without being
imported, causing the Gatsby build to fail with "Expected component
Card to be defined". Added the import from @sistent/sistent to all
three files.

Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com>
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
@l5io
Copy link
Copy Markdown
Member

l5io commented Apr 3, 2026

🚀 Preview for commit 4748878 at: https://69cf6c7405c70d5f108130dc--layer5.netlify.app

Copy link
Copy Markdown
Member

@rishiraj38 rishiraj38 left a comment

Choose a reason for hiding this comment

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

Add them to the this file for navigation.

Adds the three navigation entries for the Card component (overview,
guidance, code) to content.js, addressing the review feedback on layer5io#7582.

Signed-off-by: Abhay Chaurasiya <abhaychaurasiya19@gmail.com>
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
Copy link
Copy Markdown
Author

@abhay1999 abhay1999 left a comment

Choose a reason for hiding this comment

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

Hey @rishiraj38, added the Card entries to content.js — overview, guidance, and code links are all in there now, placed alphabetically between Box and Button. Let me know if anything else needs fixing!

@l5io
Copy link
Copy Markdown
Member

l5io commented Apr 3, 2026

🚀 Preview for commit 2281c7f at: https://69cfc62ce4c16a61ffaa7a35--layer5.netlify.app

Copy link
Copy Markdown
Member

@rishiraj38 rishiraj38 left a comment

Choose a reason for hiding this comment

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

No! Please place it above the chip component, not in the correct navigation location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants