CopyKit™

One-click copy-paste functionality for Webflow components.


Overview

CopyKit™ lets you instantly copy and paste ready-to-use Webflow components with one click. It intelligently detects the content format (JSON, HTML, or plain text) and copies it to the clipboard in the appropriate format. Perfect for component libraries, design systems, and code showcases.

Features

  • Smart format detection — Automatically detects and copies content as JSON, HTML, or plain text

  • One-click copying — Simple button click to copy any content

  • Success interactions — Optional visual feedback when content is copied

  • Zero dependencies — Lightweight and fast-loading

  • Webflow-friendly — Works seamlessly with Webflow's interaction system


Quick Start

1. Add the Script

Add to your Webflow project's global settings, inside the <head> tag:

<script 
  src="https://cdn.jsdelivr.net/npm/@reform-digital/[email protected]/prod/index.js"
  defer
></script>

That's it! CopyKit initializes automatically and is ready to use.

2. Set Up Your Copy Component

Structure your component with the required data attributes:


Usage

Basic Structure

Every copy component needs three essential parts:

  1. Wrapper (rd-copyflow="wrapper") — Contains the entire copy component

  2. Content source (rd-copyflow="copy-this") — The element whose content will be copied

  3. Button (rd-copyflow="button") — The element that triggers the copy action

Optional: Success Interaction

Add a success interaction element (rd-copyflow="success-interaction") to trigger a Webflow interaction when content is successfully copied. This is useful for showing "Copied!" messages or visual feedback.

The success interaction will be automatically clicked when content is copied, and clicked again after 2 seconds to reset (perfect for toggle-style interactions).

Data Attributes

  • rd-copyflow="wrapper" — Required wrapper element that contains all copy-related elements

  • rd-copyflow="copy-this" — Required element whose text content will be copied

  • rd-copyflow="button" — Required element that triggers the copy action (clickable)

  • rd-copyflow="success-interaction" — Optional element that triggers on successful copy (typically a Webflow interaction trigger)


How It Works

  1. On page load, CopyKit scans for all buttons with rd-copyflow="button"

  2. When a button is clicked, it finds the nearest wrapper (rd-copyflow="wrapper")

  3. Inside the wrapper, it locates the content source (rd-copyflow="copy-this")

  4. It intelligently detects the content format:

    • JSON — If the content is valid JSON (object or array), it copies as formatted JSON

    • HTML — If the content contains HTML tags, it copies as HTML

    • Plain text — Otherwise, it copies as plain text

  5. The content is added to the clipboard in the appropriate format

  6. If a success interaction element exists, it's triggered to provide visual feedback

Example: Copying a Component

When the "Copy Code" button is clicked, the HTML inside rd-copyflow="copy-this" will be copied to the clipboard as HTML format, and the success message will appear (if you've set up a Webflow interaction on that element).

Example: Copying JSON

The JSON will be copied in a properly formatted way, making it easy to paste into code editors or share with developers.


Support

Need help? Join our Slack community.


Product Tracking

CopyKit™ includes an extremely lightweight telemetry module that helps us understand product adoption patterns. This information allows us to focus our support efforts and prioritize product enhancements where they matter most.

What We Track:

  • Product Identifier: The name of the product (e.g., "COPY_KIT")

  • Domain: The public hostname where the product is installed (e.g., "example.com")

Privacy & Performance:

  • No cookies, fingerprinting, or personally identifiable information

  • Only runs on live, public domains (never on localhost or development environments)

  • Single lightweight request sent once per page load

  • Data is aggregated for internal analytics only

  • Not used for advertising, marketing, or tracking


Last updated