Skip to content

Effects not working? #15

@ved-patel226

Description

@ved-patel226

Image

^^
why isn't the blur working?

Heres my code:

import { ReactNode } from "react";
import styles from "../../styles/css/components/Atoms/Card.module.css";
import LiquidGlass from "liquid-glass-react";

export interface CardProps {
  header?: ReactNode;
  children?: ReactNode;
  imageAlt?: string;
}

export function Card({ header, children, imageAlt = "" }: CardProps) {
  return (
    <div
      style={{
        position: "sticky",
        left: "50%",
        top: "50vh",
        width: "50%",
      }}
    >
      <LiquidGlass
        displacementScale={64}
        blurAmount={1}
        saturation={130}
        aberrationIntensity={2}
        elasticity={0}
        cornerRadius={32}
        style={{
          position: "absolute",
          left: "0",
          top: "0",
          transform: "translateX(-50%)",
        }}
      >
        <div className={styles.card} aria-label={imageAlt}>
          {header && <h1 className="semi_ttl">{header}</h1>}
          <div className={styles.content}>{children}</div>
        </div>
      </LiquidGlass>
    </div>
  );
}

export default Card;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions