A Lightning Web Component (LWC) that can be used in Salesforce Flows to copy text to clipboard.
- Configurable button label and style
- Copies specified text to clipboard
- Shows toast notification on success/failure
- Can be used in Screen Flows
- Clone this repository
- Deploy to your Salesforce org:
sfdx force:source:deploy -p force-app
- Add the component to a Screen Flow
- Configure:
- Button Label: The text to display on the button
- Button Variant: The style/color of the button (options: base, brand, neutral, success, destructive, text-destructive)
- Value to Copy: The text that will be copied when the button is clicked
base
: Standard button stylebrand
: Primary brand color (Salesforce blue)neutral
: Neutral gray colorsuccess
: Success green colordestructive
: Destructive red buttontext-destructive
: Destructive text style
npm install
npm run lint
npm run test:unit
MIT