Skip to content

Conversation

@mfbz
Copy link
Contributor

@mfbz mfbz commented Oct 23, 2025

Added NftCard component for displaying NFT metadata. The component automatically fetches and renders NFT information including image, name, description, collection details, traits, and external links. Features loading states, error handling, dark mode support and optional display of traits and additional metadata through showTraits and showExtra props.

Close #2500

@mfbz mfbz requested a review from a team as a code owner October 23, 2025 19:18
@changeset-bot
Copy link

changeset-bot bot commented Oct 23, 2025

🦋 Changeset detected

Latest commit: ef3505a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@onflow/react-sdk Minor
@onflow/demo Minor

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

@vercel
Copy link

vercel bot commented Oct 23, 2025

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

Project Deployment Preview Comments Updated (UTC)
react-sdk-demo Ready Ready Preview Comment Oct 31, 2025 0:32am

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@chasefleming
Copy link
Member

Should we include a few example NFTs as default options in the NFT Card on the playground? Maybe it could just be buttons like the scripts, where users can pick from a few examples. Otherwise, no one will really see it since they’d have to dig up the data manually.

@chasefleming
Copy link
Member

Screenshot 2025-10-27 at 1 52 20 PM

Can we have the default showing traits and extras and maybe show the other options or have a checkbox to turn them on/off?

@chasefleming chasefleming requested a review from Copilot October 27, 2025 20:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new NftCard component to the React SDK that displays NFT metadata with automatic fetching capabilities. The component provides a polished UI for rendering NFT information with support for loading states, error handling, and dark mode.

Key Changes:

  • Added NftCard component with configurable props for displaying NFT metadata, traits, and additional information
  • Created supporting icon components (ImageIcon, DownIcon, AlertCircleIcon) for the NFT card UI
  • Integrated the component into the demo application with an interactive showcase

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/react-sdk/src/components/NftCard.tsx Core NFT card component with metadata fetching, rendering logic, and interactive trait display
packages/react-sdk/src/components/index.ts Exported NftCard component for public API
packages/react-sdk/src/icons/*.tsx Added icon components (ImageIcon, DownIcon, AlertCircleIcon) for NFT card UI elements
packages/demo/src/components/component-cards/demo-nft-card.tsx Demo page with form inputs and live preview of NftCard component
packages/demo/src/components/content-sidebar.tsx Added NFT Card entry to demo navigation
packages/demo/src/components/content-section.tsx Integrated DemoNftCard into demo layout
.changeset/bright-waves-battle.md Documented changes for version management

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chasefleming
Copy link
Member

When you click props it isn’t clear it expanded below the NFT because its so long. I wonder if it should scroll to the props section on click?

@chasefleming
Copy link
Member

What happens on something with a lot of traits?

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.

NFT component

3 participants