Dock
Dock is a React and Tailwind CSS navigation component from Motion Primitives, licensed MIT. Copy it and paste it into your project.
Motion Primitives
MIT
navigation
What it is
Dock is a React and Tailwind CSS navigation component from Motion Primitives, licensed MIT. Copy it and paste it into your project.
How to use it
Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.
Four free copies a week. No card.
Needs
npm i lucide-react
Licence
This component comes from Motion Primitives and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.
Dock
import {
Activity,
Component,
HomeIcon,
Mail,
Package,
ScrollText,
SunMoon,
} from 'lucide-react';
import { Dock, DockIcon, DockItem, DockLabel } from '@/components/core/dock';
const data = [
{
title: 'Home',
icon: (
<HomeIcon className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
{
title: 'Products',
icon: (
<Package className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
{
title: 'Components',
icon: (
<Component className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
{
title: 'Activity',
icon: (
<Activity className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
{
title: 'Change Log',
icon: (
<ScrollText className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
{
title: 'Email',
icon: (
<Mail className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
{
title: 'Theme',
icon: (
<SunMoon className='h-full w-full text-neutral-600 dark:text-neutral-300' />
),
href: '#',
},
];
export function AppleStyleDock() {
return (
<div className='absolute bottom-2 left-1/2 max-w-full -translate-x-1/2'>
<Dock className='items-end pb-3'>
{data.map((item, idx) => (
<DockItem
key={idx}
className='aspect-square rounded-full bg-gray-200 dark:bg-neutral-800'
>
<DockLabel>{item.title}</DockLabel>
<DockIcon>{item.icon}</DockIcon>
</DockItem>
))}
</Dock>
</div>
);
}