Skip to content

Add Copy Button to Code Blocks #49

Description

@yntpdotme

The Code component currently lacks a built-in copy button functionality for code blocks, which is a common and useful feature in code highlighting components.

Current Behaviour

  • Code blocks are rendered with syntax highlighting and line numbers
  • No native way to copy code contents to clipboard

Requested Feature

Add a built-in copy button functionality that:

  • Appears on hover (or permanently) in the top-right corner of code blocks
  • Copies the raw code content (without line numbers) to clipboard
  • Provides visual feedback on copy success

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions