Button Rounded
A demo example that shows the shadcn Button in its outline variant at the icon size, with the rounded-full class applied to make it a circle. It contains a lucide ArrowUpIcon and is useful as a reference for round icon buttons.
exampleregistry-item.json


Installed with plain
See how it was built shadcn add · no workarounds · theme neutral (none shipped)Installation
pnpm dlx shadcn@latest add https://ui.shadcn.com/r/styles/new-york-v4/button-rounded.json
Usage
usage.tsx
import { ArrowUpIcon } from "lucide-react"import { Button } from "@/components/ui/button"export function Example() { return ( <Button variant="outline" size="icon" className="rounded-full"> <ArrowUpIcon /> </Button> )}- Need a compact, circular icon-only button, such as a scroll-to-top or back-to-top control.
- Want an icon button with a visible border that reads as secondary rather than primary.
- Building a toolbar or floating action control that should stay visually light.
- Looking for a reference for combining the Button size="icon" variant with rounded-full.
Examples
Scroll to top button
A fixed circular button in the bottom-right corner that scrolls the window to the top.
scroll-to-top-button.tsx
import { ArrowUpIcon } from "lucide-react"import { Button } from "@/components/ui/button"export function ScrollToTop() { return ( <Button variant="outline" size="icon" className="fixed bottom-6 right-6 rounded-full shadow-md" aria-label="Scroll to top" onClick={() => window.scrollTo({ top: 0, behavior: "smooth" })} > <ArrowUpIcon /> </Button> )}Filled round icon button
The same round icon button using the default variant for a stronger, primary look.
filled-round-icon-button.tsx
import { ArrowUpIcon } from "lucide-react"import { Button } from "@/components/ui/button"export function FilledRoundButton() { return ( <Button size="icon" className="rounded-full" aria-label="Upload"> <ArrowUpIcon /> </Button> )}Chat send button
A round icon button placed at the end of a message input to submit a message.
chat-send-button.tsx
import { ArrowUpIcon } from "lucide-react"import { Button } from "@/components/ui/button"import { Input } from "@/components/ui/input"export function ChatInput() { return ( <div className="flex items-center gap-2"> <Input placeholder="Type a message..." /> <Button variant="outline" size="icon" className="rounded-full" aria-label="Send message" type="submit"> <ArrowUpIcon /> </Button> </div> )}API reference
PropTypeDefaultDescription
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined"default"Visual style of the button. This example uses "outline".
size"default" | "sm" | "lg" | "icon" | null | undefined"default"Size of the button. This example uses "icon", a square button for icon-only content.
classNamestring—Additional Tailwind classes merged into the button. This example adds "rounded-full" to make it circular.
asChildbooleanfalseWhen true, renders the child element as the button instead of a native button element.
...propsReact.ComponentProps<"button">—All other standard button attributes such as onClick, type, disabled, and aria-label are passed through to the underlying button element.
Accessibility
- An icon-only button has no visible text, so always provide an aria-label that describes the action, for example aria-label="Scroll to top".
- The default button element is focusable and activates with Enter and Space; keep the focus-visible ring intact.
- The arrow icon is decorative, so it does not need its own label when the button has an accessible name.
- Ensure the outline border and icon color meet WCAG 2.1 non-text contrast (3:1) against the surrounding background.
- Set type="submit" or type="button" explicitly when the button sits inside a form to avoid unintended submission.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
prompt.md
Use the "Button Rounded" component (shadcn-ui/button-rounded) from its shadcn registry.1. Install it with: npx shadcn@latest add https://ui.shadcn.com/r/styles/new-york-v4/button-rounded.json2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: variant, size, className, asChild, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { ArrowUpIcon } from "lucide-react"import { Button } from "@/components/ui/button"export function Example() { return ( <Button variant="outline" size="icon" className="rounded-full"> <ArrowUpIcon /> </Button> )}```Files & dependencies
- registry/new-york-v4/examples/button-rounded.tsx
registryDependenciesbutton
Uses from @shadcn-ui

