Deprecated: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 2060

Deprecated: Return type of Illuminate\Support\Collection::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 2071

Deprecated: Return type of Illuminate\Support\Collection::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 2083

Deprecated: Return type of Illuminate\Support\Collection::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 2098

Deprecated: Return type of Illuminate\Support\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 2007

Deprecated: Return type of Illuminate\Support\Collection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 1986

Deprecated: Return type of Illuminate\Support\Collection::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webroot/ROOT/vendor/illuminate/support/Collection.php on line 1955
Helsingborg Styleguide - Version 2.0

Copy Attribute

Copy an attribute here


<div data-js-copy-item="example" data-js-copy-data="The copied attribute">Copy an attribute here</div>
            <button class="c-button u-margin__bottom--3 c-button__filled c-button__filled--default c-button--md" target="_top" data-js-copy-target="example" type="button" aria-label="Copy another elements attribute" data-uid="68cc12330222e">   
     <span class="c-button__label">                     <span class="c-button__loader"></span>
                
                    <span class="c-button__label-text ">
                Copy another elements attribute
            </span>
        
    </span> </button>
        <br><br>

             <button class="c-button u-margin__left--0 c-button__filled c-button__filled--default c-button--md" target="_top" data-js-copy-target="self" data-js-copy-data="Copy this data" data-js-copy-success="The the text was copied successfully." type="button" aria-label="Copy self" data-uid="68cc123302286">   
     <span class="c-button__label">                     <span class="c-button__loader"></span>
                
                    <span class="c-button__label-text ">
                Copy self
            </span>
        
    </span> </button>    <div class="u-margin__top--4">
    <input type="text" placeholder="Paste copied content here" class="u-width--100">
    </div>

Attributes

Copies an attribute from another element (or itself) to clipboard.
If the the target attribute is set to 'self'. It copies its own data-js-copy-data.

Blade component parameters

Attributes Description Values
data-js-copy-target The element you want to trigger the copy functionality
data-js-copy-item The element to copy it from
data-js-copy-data The content to copy
data-js-copy-success Success feedback to the user
data-js-copy-error Error feedback to the user