Button
The button family contains base, stateful, magnetic and metallic treatments with different interaction costs.
Practical React example
Use a clearly labelled action button inside an existing form or toolbar, with its appearance matching the action’s importance.
Before you copy and paste
Keep the example in the React rendering environment required by the imported component. Copy components/motion/button/index.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.
Use a clearly labelled action button inside an existing form or toolbar, with its appearance matching the action’s importance
// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";
import { ArrowUpRight, Sparkles } from "lucide-react";
import { MetallicButton } from "@/components/motion/button";
export function ButtonMetallicPreview() {
return (
<div className="flex flex-wrap items-center justify-center gap-3 px-6 py-10">
<MetallicButton>
Continue
<ArrowUpRight className="size-4" />
</MetallicButton>
<MetallicButton size="sm">
<Sparkles className="size-3.5" />
Generate
</MetallicButton>
<MetallicButton size="icon" aria-label="Magic tools">
<Sparkles className="size-4" />
</MetallicButton>
</div>
);
}
Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.
The sample demonstrates appearance and local interaction. Connect the chosen button to the real form submission or action handler, and drive pending state from the operation’s outcome.
Customization
- ButtonProps.variant
- Optional; ButtonVariant.
- ButtonProps.size
- Optional; ButtonSize.
- ButtonProps.pressScale
- Optional; number.
- ButtonProps.ripple
- Optional; boolean. Spawn a Material-style ripple from the press point. Off by default.
- ButtonProps.children
- Optional; ReactNode.
- ButtonLinkProps.variant
- Optional; ButtonVariant.
- ButtonLinkProps.size
- Optional; ButtonSize.
- ButtonLinkProps.pressScale
- Optional; number.
- ButtonLinkProps.children
- Optional; ReactNode.
- StatefulButtonProps.state
- Optional; ButtonState.
- StatefulButtonProps.children
- Required; ReactNode.
- StatefulButtonProps.loadingText
- Optional; ReactNode.
- StatefulButtonProps.successText
- Optional; ReactNode.
- StatefulButtonProps.errorText
- Optional; ReactNode.
Integration notes
- Choose type="button" for non-submit actions inside a form.
- Keep an accessible name on icon-only buttons and prevent duplicate submissions at the application boundary.
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.
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.