āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/ibelick/motion-primitives/dock/page ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
export const metadata = { title: 'Dock - Motion-Primitives', description: 'A versatile UI element that provides a flexible and customizable way to organize and display menu items within your application. Built for React, Next.js, and Tailwind CSS.', };
import { AppleStyleDock } from './apple-style-dock'; import ComponentCodePreview from '@/components/website/component-code-preview';
A versatile UI element that provides a flexible and customizable way to organize and display menu items within your application.
<ComponentCodePreview component={<AppleStyleDock />} filePath='app/docs/dock/apple-style-dock.tsx' hasReTrigger />
<Step>Copy and paste the following code into your project.</Step>
<CodeBlock filePath='components/core/dock.tsx' /><Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </Tabs>| Prop | Type | Default | Description |
| :------------ | :------------ | :------------------------------------------- | :--------------------------------------------------------------------------------------- |
| children | ReactNode | | The child elements to be animated. |
| className | string | undefined | Optional CSS class for styling the component. |
| spring | SpringOptions | { mass: 0.1, stiffness: 150, damping: 12 } | Spring options from motion for animation effects. |
| magnification | number | 80 | The scaling factor applied to a dock item on hover. |
| distance | number | 150 | The distance from the center of a dock item at which the magnification animation starts. |
| panelHeight | number | 64 |
| Prop | Type | Default | Description | | :-------- | :--------- | :-------- | :--------------------------------------------------------- | | children | ReactNode | | DockLabel and DockIcon | | className | string | undefined | Optional CSS class for styling the component. | | onClick | () => void | undefined | Optional click handler triggered when the item is clicked. |
| Prop | Type | Default | Description | | :-------- | :-------- | :-------- | :---------------------------------------------------------- | | children | ReactNode | | Content of the label, typically a string or formatted text. | | className | string | undefined | Optional CSS class for styling the component. |
| Prop | Type | Default | Description | | :-------- | :-------- | :-------- | :-------------------------------------------- | | children | ReactNode | | Icon | | className | string | undefined | Optional CSS class for styling the component. |
Created by @kashyap20, inspired by Build UI - Magnified Dock
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā