diff --git a/apps/playground/src/index.css b/apps/playground/src/index.css index d924e2434..67b593e52 100644 --- a/apps/playground/src/index.css +++ b/apps/playground/src/index.css @@ -67,3 +67,21 @@ @apply bg-background text-foreground; } } + +@layer utilities { + /* Dot grid background patterns */ + .bg-dot-pattern { + background-image: radial-gradient(circle, #cbd5e1 1.5px, transparent 1.5px); + background-size: 32px 32px; + } + + .bg-dot-pattern-sm { + background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px); + background-size: 20px 20px; + } + + /* Custom spinner animation */ + .animate-spin-reverse { + animation: spin 1s linear infinite reverse; + } +} diff --git a/apps/playground/src/pages/Home.tsx b/apps/playground/src/pages/Home.tsx index 2ca3df85b..0f5acd25b 100644 --- a/apps/playground/src/pages/Home.tsx +++ b/apps/playground/src/pages/Home.tsx @@ -19,59 +19,82 @@ export const Home = () => { const [activeCategory, setActiveCategory] = useState('Layouts'); return ( -
+
{/* Hero Section */} -
+
-
-
+
+
- Object UI Studio + Object UI Studio
+ + + GitHub
-
-
-

+
+
+ {/* Decorative elements */} +
+
+
+
+ +
+ + + + + Interactive Visual Editor +
+ +

Build Stunning Interfaces,
- Purely from JSON. + Purely from JSON.

-

+

Object UI transforms JSON schemas into fully functional, accessible, and responsive React applications. - Select a template below to start building. +
+ Select a template below to start building.

{/* Category Filter */} -
+
{Object.keys(exampleCategories).map((category) => ( ))}
{/* Examples Grid */} -
+
{exampleCategories[activeCategory as keyof typeof exampleCategories].map((key) => { // Try to parse the example to get a description or just format the title const title = key.split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' '); @@ -80,32 +103,44 @@ export const Home = () => {
navigate(`/studio/${key}`)} - className="group relative bg-white rounded-2xl border border-gray-200 overflow-hidden hover:shadow-xl transition-all duration-300 cursor-pointer hover:border-indigo-200 flex flex-col h-64" + className="group relative bg-white rounded-2xl border-2 border-gray-200 overflow-hidden hover:shadow-2xl hover:shadow-indigo-500/20 transition-all duration-300 cursor-pointer hover:border-indigo-400 hover:-translate-y-1 flex flex-col h-72" > + {/* Gradient overlay on hover */} +
+ {/* Mock Preview Window */} -
-
-
-
-
-
+
+ {/* Decorative grid */} +
+ +
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-

+
+

{title}

-
- Launch Studio +
+
+ Launch Studio + +
+
+ Try Now +
diff --git a/apps/playground/src/pages/Studio.tsx b/apps/playground/src/pages/Studio.tsx index 116e58866..808590f4a 100644 --- a/apps/playground/src/pages/Studio.tsx +++ b/apps/playground/src/pages/Studio.tsx @@ -89,26 +89,28 @@ const StudioToolbarContext = ({ }; return ( -
+
-
+
- Object Studio - / - {exampleTitle} + + Object Studio + / + {exampleTitle} +
-
- - +
+ + {jsonError ? 'Error' : 'Ready'}
@@ -118,13 +120,13 @@ const StudioToolbarContext = ({ {/* Center: View Mode Switcher */}
-
+
)} -
+
@@ -286,14 +288,14 @@ const StudioEditor = ({ exampleId, initialJson }: { exampleId: ExampleKey, initi

) : viewMode === 'preview' ? ( -
-
+
+
{/* Viewport Size Toggles */} -
+
{/* Mobile/Tablet Bar */} {viewportSize !== 'desktop' && ( -
-
+
+
)} @@ -357,17 +354,21 @@ const StudioEditor = ({ exampleId, initialJson }: { exampleId: ExampleKey, initi ) : (
{jsonError ? ( -
-

- +

+

+ Invalid JSON

-

{jsonError}

+

{jsonError}

) : ( -
-
-

Rendering...

+
+
+ {/* Dual spinner: outer uses animate-spin and inner uses animate-spin-reverse for a counter-rotating loading effect */} +
+
+
+

Rendering your UI...

)}
@@ -410,18 +411,13 @@ const StudioEditor = ({ exampleId, initialJson }: { exampleId: ExampleKey, initi
{/* Side Preview */} -
+
-
-
-
-
-
+
+
+
+
+
{schema && !jsonError ? (