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

Compress

Uses the display method.

1 2 3 4 5 6 7 ...

Using the class method

1 2 3 ...(4)

Allow toggle

1 2 3 4 5 6 7 ...Toggle
<h2>Uses the display method.</h2>
        <div>
            <span>1</span>
            <span>2</span>
            <span>3</span>
            <span>4</span>
            <span>5</span>
            <span>6</span>
            <span>7</span>
            <span data-js-compressed="3">...</span>
        </div>

          <h2>Using the class method</h2>
            <div class="c-tags" id="682b520d60f39" data-uid="682b520d60f39">
                                    <span class="c-tags__tag ">
                                            
                                        1
                    
                </span>
                                                <span class="c-tags__tag ">
                                            
                                        2
                    
                </span>
                                                <span class="c-tags__tag ">
                                            
                                        3
                    
                </span>
                                                <span class="c-tags__tag is-hidden">
                                            
                                        4
                    
                </span>
                                                <span class="c-tags__tag is-hidden">
                                            
                                        5
                    
                </span>
                                                <span class="c-tags__tag is-hidden">
                                            
                                        6
                    
                </span>
                                                <span class="c-tags__tag is-hidden">
                                            
                                        7
                    
                </span>
                    
                    <span class="c-tags__tag c-tags__tag-more" data-js-compressed="3" data-js-compressed-class="is-hidden">
                ...(4)
            </span>
        
        </div>

    <h2>Allow toggle</h2>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
        <span>6</span>
        <span>7</span>
        <span data-js-compressed="3" data-js-compressed-toggle>...Toggle</span>
    </div>

Attributes

The compress script removes/adds classes or sets display none on sibling elements.

Blade component parameters

Attributes Description Values
data-js-compressed Compresses sibling elements (using classes or display styling). number
data-js-compressed-class A class name to be added/removed class
data-js-compressed-toggle Add the attribute to allow toggling of the items.