Datebadge

Datebadge

16 Apr
<!-- datebadge.blade.php -->
<div class="c-datebadge c-datebadge--md" data-uid="661e43a88ba56">
    <div class="c-datebadge__daymonth">
            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__date c-typography__variant--h1" data-uid="661e43a88bb0e">
    16
</span>            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__month c-typography__variant--h4" data-uid="661e43a88bb6d">
    Apr
</span>    </div>
    </div>
@datebadge([
    'date' => date("Y-m-d")
])
@enddatebadge

Datebadge

16 Apr
<!-- datebadge.blade.php -->
<div class="c-datebadge c-datebadge--sm" data-uid="661e43a88c30a">
    <div class="c-datebadge__daymonth">
            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__date c-typography__variant--h1" data-uid="661e43a88c351">
    16
</span>            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__month c-typography__variant--h4" data-uid="661e43a88c394">
    Apr
</span>    </div>
    </div>
@datebadge([
    'date' => date("Y-m-d"),
    'size' => 'sm'
])
@enddatebadge

Datebadge with time

16 Apr
09:23
<!-- datebadge.blade.php -->
<div class="c-datebadge c-datebadge--md" data-uid="661e43a88c927">
    <div class="c-datebadge__daymonth">
            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__date c-typography__variant--h1" data-uid="661e43a88c965">
    16
</span>            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__month c-typography__variant--h4" data-uid="661e43a88c9a6">
    Apr
</span>    </div>
            <div class="c-datebadge__time">
                <!-- icon.blade.php -->
    <span class="c-icon c-icon--access-time c-icon--material c-icon--material-access_time material-symbols-outlined material-symbols-outlined--filled c-icon--size-inherit" material-symbol="access_time" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="661e43a88ca17">
                access_time
    </span>
                <!-- typography.blade.php   original: span -->
<span class="c-typography c-typography__variant--meta" data-uid="661e43a88ca53">
    09:23
</span>        </div>
    </div>
@datebadge([
    'date' => date("Y-m-d H:i:s"),
    'includeTime' => true
])
@enddatebadge

Datebadge with time, small variant

16 Apr
09:23
<!-- datebadge.blade.php -->
<div class="c-datebadge c-datebadge--sm" data-uid="661e43a88d06f">
    <div class="c-datebadge__daymonth">
            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__date c-typography__variant--h1" data-uid="661e43a88d0a9">
    16
</span>            <!-- typography.blade.php   original: span -->
<span class="c-typography c-datebadge__month c-typography__variant--h4" data-uid="661e43a88d0db">
    Apr
</span>    </div>
            <div class="c-datebadge__time">
                <!-- icon.blade.php -->
    <span class="c-icon c-icon--access-time c-icon--material c-icon--material-access_time material-symbols-outlined material-symbols-outlined--filled c-icon--size-inherit" material-symbol="access_time" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="661e43a88d13a">
                access_time
    </span>
                <!-- typography.blade.php   original: span -->
<span class="c-typography c-typography__variant--meta" data-uid="661e43a88d17d">
    09:23
</span>        </div>
    </div>
@datebadge([
    'date' => date("Y-m-d H:i:s"),
    'includeTime' => true,
    'size' => 'sm'
])
@enddatebadge

Blade component parameters

Key Default value Type Available values Description
date false boolean - A date string in any format.
includeTime false boolean - Will add a box with timestamp below the date.
size md string - The size of the datebadge. Can be either 'sm' or 'md'.
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/Datebadge/datebadge.json