Magnified Docs

Mackbook toolbar like interactive tabs

images

Installation

npm install framer-motion

Data of this Magnified Doc Component

1
const apps = [
2
{
3
id: 'carousel',
4
icon: Icons.doc_icon5,
5
name: 'Carousel',
6
onClick: () =>
7
window.open(
8
'https://www.ui-layout.com/components/embla-carousel',
9
'_blank',
10
'noopener,noreferrer'
11
),
12
imgSrc:
13
'https://res.cloudinary.com/dzl9yxixg/image/upload/carousel_ymyqq4.svg',
14
},
15
{
16
id: 'tabs',
17
icon: Icons.doc_icon4,
18
name: 'Tabs',
19
onClick: () =>
20
window.open(
21
'https://www.ui-layout.com/components/tabs',
22
'_blank',
23
'noopener,noreferrer'
24
),
25
imgSrc: 'https://res.cloudinary.com/dzl9yxixg/image/upload/tabs_hgujxo.svg',
26
},
27
{
28
id: 'faqs',
29
icon: Icons.doc_star,
30
name: 'Faqs',
31
onClick: () =>
32
window.open(
33
'https://www.ui-layout.com/components/faqs',
34
'_blank',
35
'noopener,noreferrer'
36
),
37
imgSrc: 'https://res.cloudinary.com/dzl9yxixg/image/upload/faqs_qubbig.svg',
38
},
39
{
40
id: 'grid',
41
icon: Icons.doc_icon3,
42
name: 'Grid',
43
onClick: () =>
44
window.open(
45
'https://www.ui-layout.com/components/grid',
46
'_blank',
47
'noopener,noreferrer'
48
),
49
imgSrc: 'https://res.cloudinary.com/dzl9yxixg/image/upload/grid_rbis5c.svg',
50
},
51
{
52
id: 'masking',
53
icon: Icons.doc_circle,
54
name: 'Masking',
55
onClick: () =>
56
window.open(
57
'https://www.ui-layout.com/components/image-masking',
58
'_blank',
59
'noopener,noreferrer'
60
),
61
imgSrc:
62
'https://res.cloudinary.com/dzl9yxixg/image/upload/image_masking_kbdo7a.svg',
63
},
64
{
65
id: 'mouseTrail',
66
icon: Icons.doc_rectangle,
67
name: 'MouseTrail',
68
onClick: () =>
69
window.open(
70
'https://www.ui-layout.com/components/image-mousetrail',
71
'_blank',
72
'noopener,noreferrer'
73
),
74
imgSrc:
75
'https://res.cloudinary.com/dzl9yxixg/image/upload/image_mousetrail_jt45al.svg',
76
},
77
{
78
id: 'sticky',
79
icon: Icons.doc_icon2,
80
name: 'Sticky',
81
onClick: () =>
82
window.open(
83
'https://www.ui-layout.com/components/sticky-scroll',
84
'_blank',
85
'noopener,noreferrer'
86
),
87
imgSrc:
88
'https://res.cloudinary.com/dzl9yxixg/image/upload/sticky_xao8zr.svg',
89
},
90
{
91
id: 'accordion',
92
icon: Icons.doc_triangle,
93
name: 'Accordion',
94
onClick: () =>
95
window.open(
96
'https://www.ui-layout.com/components/image-accordions',
97
'_blank',
98
'noopener,noreferrer'
99
),
100
imgSrc:
101
'https://res.cloudinary.com/dzl9yxixg/image/upload/gallerynew_x3apwx.svg',
102
},
103
];
title="tooltip.tsx"
'use client'
import { cn } from '@/lib/utils'
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
import * as React from 'react'
const TooltipProvider = TooltipPrimitive.Provider
const Tooltip = TooltipPrimitive.Root
const TooltipTrigger = TooltipPrimitive.Trigger
const TooltipContent = React.forwardRef<
React.ElementRef<typeof TooltipPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
>(({ className, sideOffset = 4, ...props }, ref) => (
<TooltipPrimitive.Portal>
<TooltipPrimitive.Content
ref={ref}
sideOffset={sideOffset}
className={cn(
'z-50 overflow-hidden rounded-lg border bg-background backdrop-filter dark:border-[#2C2C2C] backdrop-blur-lg dark:bg-[#1A1A1A]/95 px-4 py-3 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
className
)}
{...props}
/>
</TooltipPrimitive.Portal>
))
TooltipContent.displayName = TooltipPrimitive.Content.displayName
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }