Floating Action Button
FAB
Vestibulum id ligula porta felis euismod semper
<div class="c-fab c-fab__bottom-right" data-uid="6991f2c44a290">
<div data-js-toggle-item="panel-id-6991f2c44a287" data-js-toggle-class="c-fab__panel--open" class="c-fab__panel">
<!-- typography.blade.php original: p -->
<p class="c-typography c-fab__heading c-typography__variant--h6" data-uid="6991f2c44a2f5">
Vestibulum id ligula porta felis euismod semper
</p>
<!-- nav.blade.php -->
<ul class="c-nav c-nav--tiles c-nav--depth-1 unlist c-nav--vertical" aria-orientation="vertical" role="menu" data-js-keep-in-viewport-after-resize="1" id="id_6991f2c44950e" data-uid="6991f2c44950e">
<li id="6991f2c44950e-5505411034595892845-0__item" class="c-nav__item c-nav__item--default c-nav__item--depth-1 has-fetched" role="menuitem" data-depth="1" aria-label="Arbete">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c44950e-5505411034595892845-0__label" data-uid="6991f2c4497a4">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Arbete
</span>
</a>
</div>
<!-- nav.blade.php -->
<div class="c-element c-nav__child-container" data-uid="6991f2c449c3a">
<ul class="c-nav c-nav--child c-nav--height-sm c-nav--depth-2 unlist c-nav--vertical" aria-orientation="vertical" role="menu" data-js-keep-in-viewport-after-resize="1" id="id_6991f2c44981b" data-uid="6991f2c44981b">
<li id="6991f2c44981b-1053308442571861029-0__item" class="c-nav__item c-nav__item--default c-nav__item--depth-2 has-fetched" role="menuitem" data-depth="2" aria-label="Arbete - Child 1 with a long name">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c44981b-1053308442571861029-0__label" data-uid="6991f2c4498f9">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Arbete - Child 1 with a long name
</span>
</a>
</div>
<!-- nav.blade.php -->
<div class="c-element c-nav__child-container" data-uid="6991f2c449b4e">
<ul class="c-nav c-nav--child c-nav--height-sm c-nav--depth-3 unlist c-nav--vertical" aria-orientation="vertical" role="menu" data-js-keep-in-viewport-after-resize="1" id="id_6991f2c449944" data-uid="6991f2c449944">
<li id="6991f2c449944-469431921190529623-0__item" class="c-nav__item c-nav__item--default c-nav__item--depth-3" role="menuitem" data-depth="3" aria-label="Arbete - Granchild 1">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c449944-469431921190529623-0__label" data-uid="6991f2c449a0b">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Arbete - Granchild 1
</span>
</a>
</div>
</li>
<li id="6991f2c449944-7569709484503141055-1__item" class="c-nav__item c-nav__item--default c-nav__item--depth-3" role="menuitem" data-depth="3" aria-label="Arbete - Granchild 2">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c449944-7569709484503141055-1__label" data-uid="6991f2c449ac2">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Arbete - Granchild 2
</span>
</a>
</div>
</li>
</ul>
</div>
</li>
<li id="6991f2c44981b-5809681515992351990-1__item" class="c-nav__item c-nav__item--default c-nav__item--depth-2" role="menuitem" data-depth="2" aria-label="Arbete - Child 2">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c44981b-5809681515992351990-1__label" data-uid="6991f2c449bfe">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Arbete - Child 2
</span>
</a>
</div>
</li>
</ul>
</div>
</li>
<li id="6991f2c44950e-8169243381823377429-1__item" class="c-nav__item c-nav__item--default c-nav__item--depth-1" role="menuitem" data-depth="1" aria-label="Bo, bygga och miljö">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c44950e-8169243381823377429-1__label" data-uid="6991f2c449cd7">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Bo, bygga och miljö
</span>
</a>
</div>
</li>
<li id="6991f2c44950e-2056445245472544203-2__item" class="c-nav__item c-nav__item--default c-nav__item--depth-1" role="menuitem" data-depth="1" aria-label="Förskola och utbildning">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c44950e-2056445245472544203-2__label" data-uid="6991f2c449d7f">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Förskola och utbildning
</span>
</a>
</div>
</li>
<li id="6991f2c44950e-5015410041542272355-3__item" class="c-nav__item c-nav__item--default c-nav__item--depth-1 has-fetched" role="menuitem" data-depth="1" aria-label="Kommun och politik">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c44950e-5015410041542272355-3__label" data-uid="6991f2c449e2d">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Kommun och politik
</span>
</a>
</div>
<!-- nav.blade.php -->
<div class="c-element c-nav__child-container" data-uid="6991f2c44a12d">
<ul class="c-nav c-nav--child c-nav--height-sm c-nav--depth-2 unlist c-nav--vertical" aria-orientation="vertical" role="menu" data-js-keep-in-viewport-after-resize="1" id="id_6991f2c449e72" data-uid="6991f2c449e72">
<li id="6991f2c449e72-1944957273774605363-0__item" class="c-nav__item c-nav__item--default c-nav__item--depth-2" role="menuitem" data-depth="2" aria-label="About">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c449e72-1944957273774605363-0__label" data-uid="6991f2c449f31">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
About
</span>
</a>
</div>
</li>
<li id="6991f2c449e72-1709063106751663386-1__item" class="c-nav__item c-nav__item--default c-nav__item--depth-2" role="menuitem" data-depth="2" aria-label="Contact">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c449e72-1709063106751663386-1__label" data-uid="6991f2c449fd0">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Contact
</span>
</a>
</div>
</li>
<li id="6991f2c449e72-3297839691012330970-2__item" class="c-nav__item c-nav__item--default c-nav__item--depth-2" role="menuitem" data-depth="2" aria-label="Links">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c449e72-3297839691012330970-2__label" data-uid="6991f2c44a063">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
Links
</span>
</a>
</div>
</li>
<li id="6991f2c449e72-754408360610195230-3__item" class="c-nav__item c-nav__item--default c-nav__item--depth-2" role="menuitem" data-depth="2" aria-label="More info">
<div class="c-nav__item-wrapper">
<a class="c-link c-nav__link" href="#" target="_top" id="id_6991f2c449e72-754408360610195230-3__label" data-uid="6991f2c44a0f4">
<!-- icon.blade.php -->
<span
class="c-nav__text"
style="">
More info
</span>
</a>
</div>
</li>
</ul>
</div>
</li>
<li id="6991f2c44950e-1637841822556532822-4__item" class="c-nav__item c-nav__item--button c-nav__item--depth-1" role="menuitem" data-depth="1" aria-label="Omsorg och stöd">
<div class="c-nav__item-wrapper">
<a class="c-button c-nav__button c-button__filled c-button__filled--primary c-button--md" aria-label="Omsorg och stöd" href="#" target="_top" id="id_6991f2c44950e-1637841822556532822-4__label" data-uid="6991f2c44a1e6">
<span class="c-button__label"> <span class="c-button__loader"></span>
<span class="c-button__label-text c-button__label-text--reverse">
Omsorg och stöd
</span>
</span> </a>
</div>
</li>
</ul>
</div>
<button class="c-button c-button__filled c-button__filled--primary c-button--md" data-js-toggle-trigger="panel-id-6991f2c44a287" type="button" aria-label="Open menu" data-uid="6991f2c44a33d">
<span class="c-button__label"> <span class="c-button__loader"></span>
<span class="c-button__label-icon c-button__label-icon--reverse">
<!-- icon.blade.php -->
<span class="c-icon c-icon--apps c-icon--material c-icon--material-apps material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" aria-hidden="false" data-material-symbol="apps" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" data-uid="6991f2c44a37e">
</span>
</span>
<span class="c-button__label-text c-button__label-text--reverse">
Open menu
</span>
</span> </button> </div>
@fab([
'position' => 'bottom-right',
'heading' => "Vestibulum id ligula porta felis euismod semper",
'button' => [
'icon' => 'apps',
'size' => 'md',
'color' => 'primary',
'text' => 'Open menu',
'reversePositions' => true,
],
'classList' => []
])
@nav([
'items' => \HbgStyleGuide\Navigation::getMockedMultilevel(),
'direction' => 'vertical',
'includeToggle' => false,
'classList' => ['c-nav--tiles']
])
@endnav
@endfab
Blade component parameters
| Key | Default value | Type | Available values | Description |
| position | bottom-right | string | - | Where on the screen the FAB should be positioned |
| heading | Samlade länkar för elever och föräldrar | string | - | Heading text for panel |
| button | false | boolean | - | Settings for the button element (trigger) |
| slot | string | - | Contents of popup panel | |
| closeLabel | false | boolean | - | The label to indicate closing action |
| closeIcon | false | boolean | - | The icon to indicate closing action |
| 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. |