Notification

Basic Card component

Card is based on a paper component

This is a warning
<button class="c-button notification__button c-button__filled c-button__filled--primary c-button--md" target="_top" type="filled" aria-label="Get notification" data-uid="660672156f7da">   
     <span class="c-button__label">         
        
                    <span class="c-button__label-text ">
                Get notification
            </span>
        
    </span> </button>

    <!-- typography.blade.php -->
<div class="c-notification c-notification__spawn--bottom-left u-display--none" autoHideDuration="10000" maxAmount="3" direction="bottom-left" data-uid="660672156f85f">
        <!-- notice.blade.php -->
<div class="c-notice c-notice--danger" id="660672156f8dd" data-uid="660672156f8e7" aria-labelledby="notice__text__660672156f8dd">
    
    <!-- notice__ico -->
            <span class="c-notice__icon">
                <!-- icon.blade.php -->
    <span class="c-icon c-icon--warning c-icon--material c-icon--material-warning material-symbols-outlined material-symbols-outlined--filled c-icon--size-md" material-symbol="warning" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="660672156f955">
                warning
    </span>
        </span>
        
    <!-- notice__title -->
    
    <!-- notice__text -->
    <span id="notice__text__660672156f8dd" for="" class="c-notice__message">
                    This is a warning
                
    </span>

</div></div>
@button(['type' => 'filled', 'text' => 'Get notification', 'color' => 'primary', 'classList' => ['notification__button']])
@endbutton


@notification(
    [
        'type' => 'danger',
        'message' => ['text' => 'This is a warning', 'size' => 'md'],
        'icon' => ['name' => 'warning', 'size' => 'md', 'color' => 'white'],
        'animation' => ['onPageLoad' => false, 'direction' => 'bottom-left'],
        'autoHideDuration' => '10000',
        'maxAmount' => '3'
    ]
)
@endnotification

Blade component parameters

Key Default value Type Available values Description
element div string - What element the markup will use.
slot string - The content
message [] array - -
type NULL - -
icon [] array - -
animation {"onPageLoad":false,"direction":null} array - -
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/Notification/notification.json