Copy Button
A button component that copies text to clipboard with visual feedback.Usage
1import { CopyButton } from "@raystack/apsara";
Props
The CopyButton component extends IconButton props and accepts the following additional props
Prop
Type
All IconButton props are supported
Examples
Size
Like IconButton, CopyButton supports different sizes:
1<Flex gap="medium" align="center">2 <CopyButton text="Copy me!" size={1} />3 <CopyButton text="Copy me!" size={2} />4 <CopyButton text="Copy me!" size={3} />5 <CopyButton text="Copy me!" size={4} />6</Flex>
States
The CopyButton inherits all states from IconButton
1<Flex gap="medium" align="end">2 <CopyButton text="Copy me!" size={4} />3 <CopyButton text="Copy me!" size={4} disabled />4</Flex>