Skip to content

Copy buttons for commands are missed on mobile #1771

Open

Description

@alex-key

Describe the bug

On Package page each command has a "Copy" button next to it. It is visible on hover state for the desktop version. But it is missed on mobile devices since there is no hover state.

Steps to reproduce:

  • Use mobile device or emulator in your browser
  • Go to https://npmx.dev/package/nuxt#get-started
  • In section "GET STARTED" check no button is visible to copy commands
  • Still copied if you click on command, but it's not intuitive

Additional context

Image Image

Activity

  1. changed the title [-]Copy buttons for commands is missed on mobile[/-] [+]Copy buttons for commands are missed on mobile[/+] on Mar 1, 2026
  2. added
    frontFrontend, Design
    a11yRelated to accessibility and inclusion
    on Mar 1, 2026
  3. added theissue type on Mar 1, 2026
  4. ackzell commented on Mar 2, 2026

    @ackzell
    Contributor

    Hi @alex-key,

    What is the expected behavior that is an acceptable fix for this?

    While attempting to reproduce I noticed is that I can "tap" on the command on my mobile and I do get the copy button to appear. From there, I do get the command on the clipboard if I tap on the copy button.

    Is the idea to always show the button for mobile?

  5. alex-key commented on Mar 2, 2026

    @alex-key
    ContributorAuthor

    From my point on touchscreen device it should be always visible.
    cc: @alexdln

  6. alexdln commented on Mar 2, 2026

    @alexdln
    Member

    Another problem is that we don't have much space on mobile. But perhaps we could implement our standard behavior here as well: icon + text on desktop, and just the icon on mobile (and always show it)

  7. RevanthPrk commented on Mar 8, 2026

    @RevanthPrk

    I have fixed this issue.
    On mobile devices (xs, sm, md screen sizes), it will now be displayed in this way.

    Image

    In Desktop and laptop screens, it will remain as is

    Image

    If this looks fine, then I will raise a PR @alex-key

  8. alex-key commented on Mar 8, 2026

    @alex-key
    ContributorAuthor

    I think it's ok. Icon looks a but big to me, but let's keep it as it should be compatible with a11y requirements.
    If there are any better options - we'll see during review

  9. RevanthPrk commented on Mar 9, 2026

    @RevanthPrk

    Sure, I will raise a PR now

  10. 2 remaining items

  11. removed
    staleThis has become stale and may be closed soon
    on May 21, 2026
  12. added
    needs discussionAn idea that needs more discussion to understand the scope and impact.
    on Jun 5, 2026
  13. removed
    p2Priority 2 bug (medium)
    on Aug 4, 2026
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

    a11yRelated to accessibility and inclusionfrontFrontend, Designneeds discussionAn idea that needs more discussion to understand the scope and impact.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions