@mmmmzxe/react-360-viewer 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,9 +26,34 @@ npm install @mmmmzxe/react-360-viewer
26
26
  npm install react react-dom lucide-react
27
27
  ```
28
28
 
29
+ ### Styles
30
+
31
+ Import the stylesheet once in your app (e.g. in your root layout or entry file):
32
+
33
+ ```tsx
34
+ import '@mmmmzxe/react-360-viewer/styles.css';
35
+ ```
36
+
37
+ Styles are scoped to `[data-viewer-360]` via CSS `@scope` and will not override your app's global theme or Tailwind classes. Requires a **client component** in Next.js App Router (`'use client'`).
38
+
39
+ Wrap the viewer in a sized container if needed:
40
+
41
+ ```tsx
42
+ <div className="w-full max-w-3xl">
43
+ <Viewer360 frames={frames} />
44
+ </div>
45
+ ```
46
+
47
+ If styles don't appear after updating, delete `.next` and restart the dev server.
48
+
49
+ ---
50
+
29
51
  ## Quick Start
30
52
 
31
53
  ```tsx
54
+ 'use client';
55
+
56
+ import '@mmmmzxe/react-360-viewer/styles.css';
32
57
  import { useState } from "react";
33
58
  import {
34
59
  Viewer360,