@gfazioli/mantine-scene

中文文档
2.2.18发布于 2026/11/09MITTypeScriptESM + CJS近 30 天下载 9281

A composable decorative background component for React applications built with Mantine. Layer gradients, glow blobs, dot grids, mesh gradients, noise, star fields, shooting stars, snow, rain, confetti, parallax SVG waves, radar pulses, sweeping beams and

原始使用文档
文档目录6 节
  1. Overview
  2. Sub-components
  3. Features
  4. Installation
  5. Usage
  6. Sponsor

Mantine Scene Component

Mantine Scene

mantine-scene at a glance, refreshed daily: commits, releases, stars, issues and pull requests, a year of commit activity, the weekly rhythm, languages, latest commits and releases, contributors
Made with glancecard · refreshed daily

Overview

This component is created on top of the Mantine library. It requires Mantine 9.x and React 19.

Mantine Scene is a decorative background container that composes multiple visual layers to create rich, atmospheric backgrounds for your React applications. Place it behind your content and combine sub-components to build anything from subtle gradients to full starfield environments.

Sub-components

ComponentDescription
Scene.GradientRadial, linear, or conic gradient with optional rotate/pulse animation
Scene.GlowFloating, animated glow blobs with float/pulse/breathe variants
Scene.DotGridRepeating dot pattern with stagger, fade masks, and twinkle animation
Scene.MeshMulti-stop radial gradient overlay simulating a mesh gradient
Scene.NoiseSVG-based film grain texture with configurable seed, type, and color tint
Scene.StarFieldCSS-only star field with deterministic PRNG positioning and twinkle animation
Scene.StarWarpHyperspace warp-speed effect with configurable focal point and direction
Scene.ShootingStarAnimated shooting star trails at configurable angles and intervals
Scene.SnowFalling snowflakes with horizontal drift and wind control
Scene.RainAngled rain streaks with optional bottom-edge splash effect
Scene.ConfettiMulti-shape confetti (rectangles, circles, triangles) with continuous or burst (onComplete) modes and configurable origin (top/bottom)
Scene.WavesParallax SVG wave layers with configurable direction, parallax intensity, and seamless horizontal panning
Scene.AuroraShimmering aurora borealis bands with wave animation
Scene.RadarConcentric Wi-Fi / radar pulses with arc or circle shape and smart-default origin
Scene.BeamsSweeping light columns or rows with cycled colours and configurable corner radius
Scene.GlobeInteractive 3D dotted globe (powered by cobe — optional peer dep) with markers, arcs (flight paths), drag, inertia, follow-cursor, focus

Features

  • 🎨 Theme Integration: All color props accept Mantine theme colors (MantineColor)
  • 🧩 Composable: Freely combine any number of sub-components — layer order follows DOM order
  • ✨ Rich Animations: GPU-accelerated CSS animations (transform/opacity) with per-component controls
  • 🌍 3D Globe: Interactive WebGL globe with markers, arcs, drag, inertia, and follow-cursor — cobe ships as an optional peer dep so it never weighs on consumers who don't use it
  • 🖱️ Interactive Mode: Enable mouse tracking — Glow, Gradient, StarWarp and Globe react to cursor position with configurable LERP easing. Use onMousePosition to pipe smoothed coordinates to external UI
  • 💤 Lazy Mode: Optional lazy prop pauses every child animation and the internal rAF loop when the scene leaves the viewport (via IntersectionObserver) — zero React re-renders
  • 📱 Responsive Props: Dimension props (size, blur, spacing) use Mantine's native StyleProp<T> with InlineStyles + media queries — zero re-renders on resize, same pattern as SimpleGrid
  • ♿ Accessibility: aria-hidden="true" by default; respects prefers-reduced-motion with configurable reducedMotion prop
  • 🖥️ Fullscreen: Set fullscreen to cover the entire viewport with position: fixed
  • 🎨 Styles API: Full Mantine Styles API support for all sub-components
  • 📦 TypeScript: Complete type safety with exported prop interfaces and factory types

[!note]

→ Demo and Documentation → More Mantine Components

Installation

npm install @gfazioli/mantine-scene

or

yarn add @gfazioli/mantine-scene

After installation import package styles at the root of your application:

import '@gfazioli/mantine-scene/styles.css';

Usage

import { Scene } from '@gfazioli/mantine-scene';
import { Box, Text } from '@mantine/core';

function Demo() {
  return (
    <Box pos="relative" h={400}>
      <Scene>
        <Scene.StarField count={{ base: 50, md: 100 }} twinkle />
        <Scene.Gradient from="violet" fromOpacity={0.15} />
        <Scene.Glow color="violet" size={400} blur={120} opacity={0.3} top="20%" left="30%" />
        <Scene.DotGrid color="gray" opacity={0.3} spacing={24} />
        <Scene.Noise opacity={0.025} />
      </Scene>
      <Box pos="relative" style={{ zIndex: 1 }} p="xl">
        <Text size="xl" fw={700} c="white">Your content here</Text>
      </Box>
    </Box>
  );
}

Sponsor

Your support helps me:

  • Keep the project actively maintained with timely bug fixes and security updates
  • Add new features, improve performance, and refine the developer experience
  • Expand test coverage and documentation for smoother adoption
  • Ensure long‑term sustainability without relying on ad hoc free time
  • Prioritize community requests and roadmap items that matter most

Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference. Sponsorships help cover maintenance time, infrastructure, and the countless invisible tasks that keep a project healthy.

Your help truly matters.

💚 Become a sponsor today and help me keep this project reliable, up‑to‑date, and growing for everyone.

版本与发布记录

@gfazioli/mantine-scene 共发布 24 个版本,首次发布于 2026/03/14;过去 12 个月发布了 24 个版本。

版本发布日期距今
2.2.18latest2026/11/096 天前
2.2.172026/11/069 天前
2.2.162026/10/2621 天前
2.2.152026/10/2224 天前
2.2.142026/10/131 个月前
2.2.132026/10/101 个月前

关于 @gfazioli/mantine-scene 的常见问题

@gfazioli/mantine-scene 是什么?

A composable decorative background component for React applications built with Mantine. Layer gradients, glow blobs, dot grids, mesh gradients, noise, star fields, shooting stars, snow, rain, confetti, parallax SVG waves, radar pulses, sweeping beams and

如何安装 @gfazioli/mantine-scene?

在项目目录运行 npm install @gfazioli/mantine-scene,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.x || ^19.x)、react-dom(^18.x || ^19.x)、@mantine/core(>=9.0.0)、@mantine/hooks(>=9.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@gfazioli/mantine-scene 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@gfazioli/mantine-scene 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@gfazioli/mantine-scene 可以商用吗?

@gfazioli/mantine-scene 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gfazioli/mantine-scene 的下载量有多少?

根据 npm 官方下载统计,@gfazioli/mantine-scene 在 2026/10/17 – 2026/11/15 这 30 天内被下载 9,281 次,日均约 309 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gfazioli/mantine-scene 还在维护吗?

最新版本 2.2.18 发布于 2026/11/09(6 天前);至今共发布 24 个版本,其中过去 12 个月发布了 24 个;首次发布于 2026/03/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。