Collection
Plain text collection
<div class="o-grid">
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection" data-uid="673ed1e09b64d">
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://link.link" data-uid="673ed1e09b584">
<div class="c-collection__content">
Linked item
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09b5cc">
<div class="c-collection__content">
Unlinked item
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09b5fb">
<div class="c-collection__content">
Unlinked item
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection" data-uid="673ed1e09b682">
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09b701">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09b6d0">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09b75d">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09b733">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09b7b8">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09b789">
Unlinked item
</p>
</div>
</div>
</div> </div>
</div>
<div class="o-grid">
<div class="o-grid-4">
@collection()
@collection__item(['link' => "https://link.link"])
Linked item
@endcollection__item
@collection__item()
Unlinked item
@endcollection__item
@collection__item()
Unlinked item
@endcollection__item
@endcollection
</div>
<div class="o-grid-4">
@collection(
[
'list' => [
['content' => 'Linked item', 'link' => "https://helsingborg.se"],
'Unlinked item',
['content' => 'Unlinked item', 'link' => false],
],
]
)
@endcollection
</div>
</div>
Multiline text collection
<div class="o-grid">
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection" data-uid="673ed1e09bc1a">
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://link.link" data-uid="673ed1e09bb71">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h2 class="c-typography c-typography__variant--h2" data-uid="673ed1e09bb1c">
This is a multiline
</h2> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09bb48">
We also have defined link.
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09bbf3">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h3 class="c-typography c-typography__variant--h3" data-uid="673ed1e09bba6">
This is a multiline
</h3> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09bbcd">
Nothing more than that.
</p>
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection" data-uid="673ed1e09be96">
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://link.link" data-uid="673ed1e09bc8f">
<div class="c-collection__icon">
<!-- icon.blade.php -->
<span class="c-icon c-icon--account-circle c-icon--material c-icon--material-account_circle material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" material-symbol="account_circle" role="img" data-nosnippet="" translate="no" alt="" aria-hidden="true" data-uid="673ed1e09bd61">
</span>
</div>
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09bc43">
This is a multiline with an icon
</h4> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09bc69">
We also have defined link.
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09be6c">
<div class="c-collection__icon">
<!-- icon.blade.php -->
<span class="c-icon c-icon--assignment c-icon--material c-icon--material-assignment material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" material-symbol="assignment" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" aria-hidden="false" data-uid="673ed1e09bdb8">
</span>
</div>
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09be15">
This is a multiline with an icon
</h4> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09be41">
Nothing more than that. Donec sed odio dui. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.
</p>
</div>
</div>
</div> </div>
</div>
<div class="o-grid">
<div class="o-grid-4">
@collection([])
@collection__item(['link' => 'https://link.link'])
@typography(['element' => 'h4'])
This is a multiline
@endtypography
@typography([])
We also have defined link.
@endtypography
@endcollection__item
@collection__item()
@typography(['element' => 'h4'])
This is a multiline
@endtypography
@typography([])
Nothing more than that.
@endtypography
@endcollection__item
@endcollection
</div>
<div class="o-grid-4">
@collection([])
@collection__item([
'icon' => 'account_circle',
'link' => 'https://link.link'
])
@typography(['element' => 'h4'])
This is a multiline with an icon
@endtypography
@typography([])
We also have defined link.
@endtypography
@endcollection__item
@collection__item()
@slot('prefix')
<div class="c-collection__icon">
@icon(['icon' => 'assignment', 'size' => 'md'])
@endicon
</div>
@endslot
@typography(['element' => 'h4'])
This is a multiline with an icon
@endtypography
@typography([])
Nothing more than that. Donec sed odio dui. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.
@endtypography
@endcollection__item
@endcollection
</div>
</div>
Collection with secondary
<div class="o-grid">
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection" data-uid="673ed1e09c70a">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09c474">
<div class="c-collection__icon">
<!-- icon.blade.php -->
<span class="c-icon c-icon--home c-icon--material c-icon--material-home material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" material-symbol="home" role="img" data-nosnippet="" translate="no" alt="" aria-hidden="true" data-uid="673ed1e09c4a8">
</span>
</div>
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09c41b">
This is a multiline
</h4> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09c448">
We also have defined a icon and a action link.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09c61c">
<div class="c-collection__icon">
<!-- icon.blade.php -->
<span class="c-icon c-icon--home c-icon--material c-icon--material-home material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" material-symbol="home" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" aria-hidden="false" data-uid="673ed1e09c4ef">
</span>
</div>
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09c526">
I'm an imposter!
</h4> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09c552">
I use my slots to mimic the above collection item.
</p>
</div>
<div class="c-collection__secondary">
<a class="c-link" id="" href="https://link.link" target="_top" data-uid="673ed1e09c5e4">
<!-- icon.blade.php -->
<span class="c-icon c-icon--star c-icon--material c-icon--material-star material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" material-symbol="star" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" aria-hidden="false" data-uid="673ed1e09c586">
</span>
</a>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="http://helsingborg.se" data-uid="673ed1e09c6a2">
<div class="c-collection__icon">
<!-- icon.blade.php -->
<span class="c-icon c-icon--home c-icon--material c-icon--material-home material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" material-symbol="home" role="img" data-nosnippet="" translate="no" alt="" aria-hidden="true" data-uid="673ed1e09c6d3">
</span>
</div>
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09c64c">
This is a multiline
</h4> <!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09c676">
This has the same configuration as above. But applied a link to the item. Actions then dissapear.
</p>
</div>
</a>
</div> </div>
</div>
<div class="o-grid">
<div class="o-grid-4">
@collection()
@collection__item([
'icon' => 'home',
'action' => [
'icon' => 'star',
'link' => 'http://link.link'
]
])
@typography(['element' => 'h4'])
This is a multiline
@endtypography
@typography([])
We also have defined a icon and a action link.
@endtypography
@endcollection__item
@collection__item()
@slot('prefix')
<div class="c-collection__icon">
@icon(['icon' => 'home', 'size' => 'md'])
@endicon
</div>
@endslot
@typography(['element' => 'h4'])
I'm an imposter!
@endtypography
@typography([])
I use my slots to mimic the above collection item.
@endtypography
@slot('secondary')
@link(['href' => 'https://link.link'])
@icon(['icon' => 'star', 'size' => 'md'])
@endicon
@endlink
@endslot
@endcollection__item
@collection__item([
'icon' => 'home',
'action' => [
'icon' => 'star',
'link' => 'http://link.link'
],
'link' => 'http://helsingborg.se'
])
@typography(['element' => 'h4'])
This is a multiline
@endtypography
@typography([])
This has the same configuration as above. But applied a link to the item. Actions then dissapear.
@endtypography
@endcollection__item
@endcollection
</div>
</div>
Collection with modifiers
<div class="o-grid">
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection c-collection--bordered" data-uid="673ed1e09ccf3">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09cd7d">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09cd24">
Collection modifier
</h4>
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09cd51">
This utilizes the "bordered" and will therefore display differently.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09cdd6">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09cdab">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09ce2d">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09ce04">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09ce7f">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09ce58">
Unlinked item
</p>
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection c-collection--compact" data-uid="673ed1e09ceb4">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09cf39">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09cedf">
Collection modifier
</h4>
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09cf10">
This utilizes the "compact" and will therefore display differently.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09cf8d">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09cf65">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09cfe0">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09cfb9">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d030">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d00a">
Unlinked item
</p>
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection c-collection--sharp" data-uid="673ed1e09d062">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d0e6">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09d08c">
Collection modifier
</h4>
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d0b4">
This utilizes the "sharp" and will therefore display differently.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09d132">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d10d">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d17f">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d15b">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d1c9">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d1a5">
Unlinked item
</p>
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection c-collection--sharp-bot" data-uid="673ed1e09d1f6">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d27b">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09d21f">
Collection modifier
</h4>
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d245">
This utilizes the "sharpBottom" and will therefore display differently.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09d2cd">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d2a6">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d32b">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d304">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d37a">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d354">
Unlinked item
</p>
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection c-collection--sharp-top" data-uid="673ed1e09d3b5">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d426">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09d3dd">
Collection modifier
</h4>
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d402">
This utilizes the "sharpTop" and will therefore display differently.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09d484">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d44d">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d4d5">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d4af">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d524">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d4fe">
Unlinked item
</p>
</div>
</div>
</div> </div>
<div class="o-grid-4">
<!-- collection.blade.php -->
<div class="c-collection c-collection--unbox" data-uid="673ed1e09d56f">
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d5e9">
<div class="c-collection__content">
<!-- typography.blade.php original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="673ed1e09d599">
Collection modifier
</h4>
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d5c2">
This utilizes the "unbox" and will therefore display differently.
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<a class="c-collection__item c-collection__item--show-icon c-collection__item--action" href="https://helsingborg.se" data-uid="673ed1e09d639">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d612">
Linked item
</p>
</div>
</a>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d68a">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d664">
Unlinked item
</p>
</div>
</div>
<!-- collection__item.blade.php -->
<div class="c-collection__item c-collection__item--show-icon" data-uid="673ed1e09d6e0">
<div class="c-collection__content">
<!-- typography.blade.php original: p -->
<p class="c-typography c-typography__variant--p" data-uid="673ed1e09d6b3">
Unlinked item
</p>
</div>
</div>
</div> </div>
</div>
<div class="o-grid">
@foreach(['bordered', 'compact', 'sharp', 'sharpBottom', 'sharpTop', 'unbox'] as $modifier)
<div class="o-grid-4">
@collection(
[
$modifier => true,
'list' => [
['title' => 'Collection modifier', 'content' => 'This utilizes the "' . $modifier . '" and will therefore display differently.'],
['content' => 'Linked item', 'link' => "https://helsingborg.se"],
'Unlinked item',
['content' => 'Unlinked item', 'link' => false],
],
]
)
@endcollection
</div>
@endforeach
</div>
Blade component parameters
Key | Default value | Type | Available values | Description |
componentElement | div | string | - | The element type of list. |
list | false | boolean | - | A array input list, contains 'content' and 'link' array keys. |
bordered | false | boolean | - | Adds borders. |
compact | false | boolean | - | If the list should be displayed in a compressed format. |
sharp | false | boolean | - | Every single edge as sharp as hell, be careful! |
sharpBottom | false | boolean | - | Makes the bottom really sharp. Yep. |
sharpTop | false | boolean | - | Makes the top really sharp. Yep. |
unbox | false | boolean | - | Removes the border. |
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. |