Skip to content

zk-share-button ​

A button that opens the share sheet of the device, or copies the link.

Props ​

PropTypeDefaultDescription
titlestring|nullnullTitle shared; by default the one of the page
textstring|nullnullText shared
urlstring|nullnullURL shared; by default the one of the page
labelstring'Share'Text of the button, when there is no slot
copiedLabelstring'Link copied'Announced after a copy
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultReplaces the label

Needs the script share of zk-scripts: the component asks for it by itself. It uses navigator.share when the browser has it and copies the URL otherwise; the copy is announced in a role="status" and sets data-copied.

Examples ​

Basic ​

blade
<x-zk-share-button title="Blade components" />

Documentation of 3.2.7 , built from 7415dae on 3.2.7 by pipeline #3081600448 on 2026-11-17.