Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

🚧 wip: bento wip

Dillion Verma00cda91ec989
diff --git a/components/site-header.tsx b/components/site-header.tsx
index b6d5bfc8..9296c888 100644
--- a/components/site-header.tsx
+++ b/components/site-header.tsx
@@ -16,7 +16,7 @@ interface SiteHeaderProps {
export function SiteHeader({ user }: SiteHeaderProps) {
return (
- <header className="supports-backdrop-blur:bg-background/80 sticky top-0 z-40 w-full bg-[radial-gradient(transparent_1px,white_1px)] backdrop-blur-sm [background-size:8px_8px] dark:bg-[radial-gradient(transparent_1px,#000214_1px)]">
+ <header className="supports-backdrop-blur:bg-background/80 sticky top-0 z-40 w-full bg-[radial-gradient(transparent_1px,white_1px)] backdrop-blur-sm [background-size:8px_8px] dark:bg-[radial-gradient(transparent_1px,#09090B_1px)]">
<div className="container flex h-16 items-center">
<MainNav />
<MobileNav />
diff --git a/content/components/bento.mdx b/content/components/bento.mdx
new file mode 100644
index 00000000..aab66b8b
--- /dev/null
+++ b/content/components/bento.mdx
@@ -0,0 +1,44 @@
+---
+title: Bento
+date: 2023-11-01
+summary: Bento is a grid layout used to showcase features of a product in a simple and elegant way.
+author: dillionverma
+published: false
+video: https://cdn.magicuikit.com/bento.mp4
+---
+
+<ComponentPreview name="bento-demo" />
+
+<Steps>
+
+<Step>
+
+## Installation
+
+Copy and paste the following code into your project.
+
+```typescript
+// lib/utils.ts
+import clsx, { ClassValue } from "clsx";
+import { twMerge } from "tailwind-merge";
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs));
+}
+```
+
+```text
+components/magicui/bento.tsx
+```
+
+<ComponentSource name="bento-demo" />
+
+</Step>
+
+</Steps>
+
+## Examples
+
+### Linear Gradient
+
+## Props
diff --git a/registry/components/example/bento-demo.tsx b/registry/components/example/bento-demo.tsx
new file mode 100644
index 00000000..4f0405f9
--- /dev/null
+++ b/registry/components/example/bento-demo.tsx
@@ -0,0 +1,62 @@
+import { cn } from "@/lib/utils";
+
+const features = [
+ {
+ name: "Graph view",
+ description:
+ "Visualize relationships between items in your library to find connections.",
+ image: "https://automatic.chat/api/og/changelog",
+ span: 1,
+ },
+ {
+ name: "Graph view",
+ description:
+ "Visualize relationships between items in your library to find connections.",
+ image: "https://automatic.chat/api/og/changelog",
+ span: 2,
+ },
+ {
+ name: "Graph view",
+ description:
+ "Visualize relationships between items in your library to find connections.",
+ image: "https://automatic.chat/api/og/changelog",
+ span: 2,
+ },
+ {
+ name: "Graph view",
+ description:
+ "Visualize relationships between items in your library to find connections.",
+ image: "https://automatic.chat/api/og/changelog",
+ span: 1,
+ },
+];
+
+export default async function BentoDemo() {
+ return (
+ <div className="grid w-full grid-cols-3 gap-y-4 md:gap-4">
+ {features.map((feature) => (
+ <div
+ key={feature.name}
+ className={cn(
+ "group relative col-span-3 flex h-[22rem] flex-col justify-between overflow-hidden rounded-xl bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:[background:radial-gradient(103.78%_100%_at_50%_0%,rgba(118,146,255,0)_80.55%,rgba(122,150,255,.04)_100%),radial-gradient(120.05%_100%_at_50%_0%,rgba(226,232,255,0)_33.78%,rgba(226,232,255,.08)_100%),rgba(226,232,255,.01)] sm:h-[26rem] lg:row-span-1",
+ {
+ "lg:col-span-1": feature.span === 1,
+ "lg:col-span-2": feature.span === 2,
+ },
+ )}
+ >
+ <div></div>
+ <div className="p-6 transition-all duration-300 group-hover:-translate-y-20">
+ <h3 className="mb-1 text-base font-medium text-neutral-700">
+ Graph view
+ </h3>
+ <p className="max-w-lg text-neutral-400">
+ Visualize relationships between items in your library to find
+ connections.
+ </p>
+ </div>
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/registry/index.tsx b/registry/index.tsx
index c5116942..0f894fb0 100644
--- a/registry/index.tsx
+++ b/registry/index.tsx
@@ -202,6 +202,14 @@ const example: Registry = {
() => import("@/registry/components/example/hero-video-youtube"),
),
},
+ "bento-demo": {
+ name: "bento-demo",
+ type: "components:example",
+ files: ["registry/components/example/bento-demo.tsx"],
+ component: React.lazy(
+ () => import("@/registry/components/example/bento-demo"),
+ ),
+ },
};
export const registry: Registry = {
diff --git a/styles/globals.css b/styles/globals.css
index c31c94c5..2658f2ae 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -37,35 +37,25 @@
}
.dark {
- --background: 233 100% 4%;
- /* --background: 0 0% 0%; */
+ --background: 240 10% 3.9%;
--foreground: 0 0% 98%;
-
+ --card: 240 10% 3.9%;
+ --card-foreground: 0 0% 98%;
+ --popover: 240 10% 3.9%;
+ --popover-foreground: 0 0% 98%;
+ --primary: 0 0% 98%;
+ --primary-foreground: 240 5.9% 10%;
+ --secondary: 240 3.7% 15.9%;
+ --secondary-foreground: 0 0% 98%;
--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;
-
- --popover: var(--background);
- --popover-foreground: var(--foreground);
-
- --card: var(--background);
- --card-foreground: var(--foreground);
-
- --border: var(--muted);
- --input: var(--muted);
-
- --primary: var(--foreground);
- --primary-foreground: 240 5.9% 10%;
-
- --secondary: var(--muted);
- --secondary-foreground: var(--foreground);
-
- --accent: var(--muted);
- --accent-foreground: ;
-
+ --accent: 240 3.7% 15.9%;
+ --accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 85.7% 97.3%;
-
- --ring: var(--muted);
+ --border: 240 3.7% 15.9%;
+ --input: 240 3.7% 15.9%;
+ --ring: 240 4.9% 83.9%;
}
}