Rendyn

Component library

189 components

Interaction

Dock

Dock arranges interactive items and can mark an active destination.

React Tailwind CSS

Practical React example

Place a small set of frequently used workspace actions in a compact dock.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/dock.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Place a small set of frequently used workspace actions in a compact dock

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { Calendar, Home, Mail, Music, Settings, Sparkles } from "lucide-react";
import { useState } from "react";
import { GithubIcon } from "@/components/app/icons";
import { Dock, DockItem, DockSeparator } from "@/components/motion/dock";

const ITEMS = [
  { id: "home", icon: Home, label: "Home" },
  { id: "mail", icon: Mail, label: "Mail" },
  { id: "calendar", icon: Calendar, label: "Calendar" },
  { id: "music", icon: Music, label: "Music" },
  { id: "discover", icon: Sparkles, label: "Discover" },
];

export function DockPreview() {
  const [active, setActive] = useState("home");

  return (
    <div className="flex w-full justify-center">
      <Dock>
        {ITEMS.map(({ id, icon: Icon, label }) => (
          <DockItem
            key={id}
            aria-label={label}
            active={active === id}
            onClick={() => setActive(id)}
          >
            <Icon className="h-5 w-5" />
          </DockItem>
        ))}
        <DockSeparator />
        <DockItem
          aria-label="Settings"
          active={active === "settings"}
          onClick={() => setActive("settings")}
        >
          <Settings className="h-5 w-5" />
        </DockItem>
        <DockItem aria-label="GitHub">
          <GithubIcon className="h-5 w-5" />
        </DockItem>
      </Dock>
    </div>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Use a DockItem callback when the item itself is the button. Omit it when the child is already a link or button, so you avoid nested interactive elements.

Customization

DockProps.children
Required; ReactNode.
DockProps.className
Optional; string.
DockProps.size
Optional; number. Size of each item in px.
DockItemProps.children
Required; ReactNode.
DockItemProps.className
Optional; string.
DockItemProps.onClick
Optional; () => void. When set, the item renders as a <button>. Omit when children carry their own link or button.
DockItemProps.active
Optional; boolean.
DockItemProps."aria-label"
Optional; string.

Integration notes

  • Give icon-only destinations an accessible name.
  • Keep routing and active state in sync and leave enough separation between touch targets.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP