Apparently, the clipboard API only works in secure context (https): https://github.com/heroui-inc/heroui/issues/2070#issuecomment-1836712018