Box

Boxes are surfaces that display content and actions on a single topic, with a solid background color. They may be provided with an icon/svg image.

A basic box

<div class="o-grid">
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e011ddc">

    
            <div class="c-box__body">

            
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e011e47">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e011e85">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e011ec6">

    
            <div class="c-box__body">

            
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e011efa">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e011f2b">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e011f61">

    
            <div class="c-box__body">

            
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e011f90">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e011fbd">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
</div>
<div class="o-grid">
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
        ])
        @endbox
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
        ])
        @endbox
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
        ])
        @endbox
    </div>
</div>

Boxes with images

<div class="o-grid">
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e01229d">

    
            <div class="c-box__body">

                                <!-- image.blade.php -->
<figure class="c-image c-box__image c-image--type-jpg" data-uid="673ed1e0122f6">
     
        <img src="/assets/img/993-300x200.jpg" alt="Placeholder image" class="c-image__image" />
            </figure>

            
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e01232e">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e01235d">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e012394">

    
            <div class="c-box__body">

                                <!-- image.blade.php -->
<figure class="c-image c-box__image c-image--type-jpg" data-uid="673ed1e0123c7">
     
        <img src="/assets/img/993-300x200.jpg" alt="Placeholder image" class="c-image__image" />
            </figure>

            
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e0123f9">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e012425">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e012464">

    
            <div class="c-box__body">

                                <!-- image.blade.php -->
<figure class="c-image c-box__image c-image--type-jpg" data-uid="673ed1e012497">
     
        <img src="/assets/img/993-300x200.jpg" alt="Placeholder image" class="c-image__image" />
            </figure>

            
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e0124c7">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e0124f3">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
</div>
<div class="o-grid">
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
            'image' => [
                'src' => '/assets/img/993-300x200.jpg',
                'alt' => 'Placeholder image',       
            ]
        ])
        @endbox
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
            'image' => [
                'src' => '/assets/img/993-300x200.jpg',
                'alt' => 'Placeholder image',       
            ]
        ])
        @endbox
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
            'image' => [
                'src' => '/assets/img/993-300x200.jpg',
                'alt' => 'Placeholder image',       
            ]
        ])
        @endbox
    </div>
</div>

Boxes with icons

<div class="o-grid">
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e012850">

    
            <div class="c-box__body">

            
                                <!-- icon.blade.php -->
    <span class="c-icon c-box__icon c-icon--card-membership c-icon--material c-icon--material-card_membership material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-inherit" material-symbol="card_membership" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" aria-hidden="false" data-uid="673ed1e012930">
                    </span>
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e01297a">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e0129ac">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e0129e4">

    
            <div class="c-box__body">

            
                                <!-- icon.blade.php -->
    <span class="c-icon c-box__icon c-icon--dynamic-form c-icon--material c-icon--material-dynamic_form material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-inherit" material-symbol="dynamic_form" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" aria-hidden="false" data-uid="673ed1e012a1b">
                    </span>
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e012a56">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e012a84">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
            <!-- block.blade.php -->
<a class="c-box c-box--ratio-1-1" href="#" data-uid="673ed1e012ab8">

    
            <div class="c-box__body">

            
                                <!-- icon.blade.php -->
    <span class="c-icon c-box__icon c-icon--donut-small c-icon--material c-icon--material-donut_small material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-inherit" material-symbol="donut_small" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" aria-hidden="false" data-uid="673ed1e012aef">
                    </span>
            
            
            
            
                                <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography c-box__heading c-typography__variant--h2" data-uid="673ed1e012b28">
    Purus Tellus
</h2>            
                                <!-- typography.blade.php   original: p -->
<p class="c-typography c-box__content c-typography__variant--p" data-uid="673ed1e012b55">
    Cras justo odio, dapibus ac facilisis in, egestas eget quam.
</p>            
        </div>
        
    </a>
    </div>
</div>
<div class="o-grid">
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
            'icon' => 'card_membership'
        ])
        @endbox
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
            'icon' => 'dynamic_form'
        ])
        @endbox
    </div>
    <div class="o-grid-12@xs o-grid-6@sm o-grid-4@md">
        @box([
            'heading' => 'Purus Tellus',
            'content' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam.',
            'link' => '#',
            'icon' => 'donut_small'
        ])
        @endbox
    </div>
</div>

Blade component parameters

Key Default value Type Available values Description
heading string - The heading of the block
content string - Short text to describe target content.
meta string - String or array of strings containing the meta information
secondaryMeta string - String or array of strings containing the secondary meta information
link string - Simple href link
ratio 1:1 string - Ratio of the block
date string - Preformatted date
image [] array - Image object (see image component), svg or raster image.
icon string - Icon name as a string.
id string - The DOM id of the component.
classList [] array - Array containing wrapping classes array
attributeList [] array - Array containing keys and values rendered as attributes
containerAware false boolean true/false Makes the component container aware. Appends modifiers --size--xs/sm/md/lg to the component.
Settings location: /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Box/box.json