reactbeginnermit

React Glass Card

A reusable glassmorphism card.

10.1k1.5k931781

About this module

A reusable frosted-glass card component with optional icon, title and footer slot.

#react#card#glass#reusable

Source code

Installation

  1. 1

    Install dependencies

    Install React and the required packages.

    npm install react react-dom
  2. 2

    Create the component

    Create ReactGlassCard.tsx and paste the source below.

  3. 3

    Create the styles

    Create `styles.css` alongside the component and import it from the component file.

  4. 4

    Import and use

    Import the component in your page or layout and render it.

Usage

  1. 1

    Import the component

    Import ReactGlassCard from its file.

    import ReactGlassCard from "./components/ReactGlassCard";
  2. 2

    Render it

    Render the component in your JSX.

    export default function App() {
      return <ReactGlassCard />;
    }
Overview
Categorycomponents
Frameworkreact
Difficultybeginner
Licensemit
Versionv1.0.0
Features
  • TypeScript-ready
  • Accessible by default
  • Component-scoped styles
Traits
  • ResponsiveYes
  • Dark modeYes
  • AccessibleYes
  • Production readyYes
Browser support
  • Chrome 90+
  • Firefox 90+
  • Safari 15+
  • Edge 90+

Related modules

Command Palette

Search modules and jump anywhere