Package of Blade components for Northeastern University websites
In order to use this package
- Your project must be using the @northeastern-web/kernl-ui JavaScript and CSS package.
- Your project also must support the new Laravel Blade 7 components.
You can install the package via composer:
composer require northeastern-web/kernl-ui-blade
Note: In order to load the scripts needed for the kernl-ui blade package, you will need to include the scripts just before the closing
</body>
tag in your main template. Example
Blade Template
{{-- Include the scripts needed for the kernl-ui blade package --}}
@include('kernl-ui::scripts')
WordPress Example (via index.php)
<?php
if (!is_admin()) {
// Example using the Sage 10 package
// and Laravel to render a blade template for 'scripts'
echo \Roots\view('kernl-ui::scripts')->render();
}
?>
Note: You may need to add the following to your
composer.json
file before installing the package.
"minimum-stability": "dev",
"prefer-stable": true
If your project is using PurgeCss, merge the default PurgeCss content from the @northeaster-web/kernl-ui
package in your tailwind.config.js
:
// tailwind.config.js
const defaultConfig = require("@northeastern-web/kernl-ui/defaultConfig");
module.exports = {
purge: {
content: [
...defaultConfig.purge.content,
// Your project specific content...
],
},
// Other stuff...
};
To use the components in a Laravel app, the Service Provider should be loaded automatically, requiring no extra configuration.
To use the components in a tightenco/jigsaw, load the Northeastern\Blade\JigsawServiceProvider
class in the Jigsaw beforeBuild
event:
// bootstrap.php
use Northeastern\Blade\JigsawServiceProvider;
use TightenCo\Jigsaw\Jigsaw;
$events->beforeBuild(function (Jigsaw $jigsaw) {
(new JigsawServiceProvider($jigsaw->app))->boot();
});
To use the local header component, add the following markup to your Blade template.
<x-kernl-local-header
:currentPath="$currentPath"
:links="$links"
:supportNav="$supportNav"
:dark="$dark"
:siteName="$siteName"
:siteHome="$siteHome"
:logoDark="$logoDark"
:logoLight="$logoLight"
:menuStyle="$menuStyle"
:search="$search"
:searchName="$searchName"
:action="$action"
:megaMenuCta="$megaMenuCta"
:megaMenuAlert="$megaMenuAlert"
:megaMenuCopy="$megaMenuCopy"
>
{{-- OPTIONAL SLOTS --}}
<x-slot name="logo">
{{-- Insert SVG logo here with class="w-full" applied --}}
{{-- NOTE: This logo will only be used if `logoDark`/`logoLight` are not provided. --}}
</x-slot>
<x-slot name="afterLinksMobile">
{{-- Insert any additional elements that should be included after the links in the mobile menu (logout forms, etc.). This slot it optional. --}}
</x-slot>
<x-slot name="afterLinksDesktop">
{{-- Insert any additional elements that should be included after the links in the desktop menu (logout forms, search modal, etc.).--}}
</x-slot>
{{-- / OPTIONAL SLOTS --}}
</x-kernl-local-header>
-
current-path
(optional) - Used to display the active state on each link. Pass the relative path of the current page (/about/staff
). -
siteName
- Provide the name of your site. Example: College of Science. This value will be used to populate various alt and name tags for accessibility purposes. -
siteHome
- Provide the home url of your site. Example: https://www.northeastern.edu/graduate. If no siteHome is provided, the default is '/'. -
logoDark
- An SVG of your site logo to be used on the default, light theme. Default is ITS Web Solutions Logo. -
logoLight
- An SVG of your site logo to be used if dark theme is being utilized. Default is ITS Web Solutions Logo.
links
(optional) - Array of links for the navigation sections of the header. Each link can have achildren
key that's an array of more links. These links will be displayed in a dropdown under the parent link. Example:$links = [ [ 'label' => 'Our Programs', 'url' => '/programs', // The `match` key is used to determine if top-level links should have the active state show. Uses Laravel's Str::is() helper under the hood, so wildcards or arrays of possible matches are allowed. If no active state should be shown, omit this key. 'match' => '/programs*', ], [ 'label' => 'About', 'url' => '/about', 'match' => '/about*', 'children' => [ [ 'label' => 'Careers', 'url' => '/about/careers', ], [ 'label' => 'Staff', 'url' => '/about/staff', ], ], ], ];
supportNav
- Optional array of links for the support navigation section of the header. This array should be formatted exactly as they are in thelinks
prop.
-
dark
(optional) - Set the color scheme to dark. Default is false. If using dark mode, you will need to provide a light logo to the logoLight prop, or use a light logo in the logox-slot
. -
menuStyle
- Pass one of two values into this: 'standard', or 'mega'. Default is 'standard.'
action
(optional) - The url the search form should submit a GET request to. The input value will be submitted as a form parameter. Note, if no action is supplied, search will not display on your site, even if you don't set thesearch
prop to false.search
- Add a search option to your local header. Default is true. Set to false to remove search functionality from your local header.searchName
- This sets thename
value of your search form input. Default is "search", but depending upon your site could be different. For instance, on WordPress sites that use the Relevanssi plugin, the searchName should be set to 's'.
megaMenuCta
- If you select 'mega' as yourmenuStyle
, you can add a CTA to the footer of each menu item. It should be formatted as such:
$megaMenuCta = [
"title" => "Your Link Title",
"url" => "https://yourlinkurl.com",
"target" => "_blank"
]
-
megaMenuAlert
- This is an optional string that will place a badge next to the title of your CTA. -
megaMenuCopy
- This is an optional string that will allow you to write some copy about your CTA for context.
To use the accordion component, add the following markup to your Blade template.
<x-kernl-accordion.base label="Leadership roles accordion" default-section="accordion-item-1">
<x-kernl-accordion.item title="Accordion Item 1 Title" id="accordion-item-1">
Accordion Item 1 Content
</x-kernl-accordion.item>
<x-kernl-accordion.item title="Accordion Item 2 Title" id="accordion-item-2">
Accordion Item 2 Content
</x-kernl-accordion.item>
</x-kernl-accordion.base>
Alternatively, you can use the x-kernl-accordion.with-left-icon
component for a slightly different design.
<x-kernl-accordion.base label="Leadership roles accordion" default-section="accordion-item-1">
<x-kernl-accordion.with-left-icon title="Accordion Item 1 Title" id="accordion-item-`">
Accordion Item 1 Content
</x-kernl-accordion.with-left-icon>
<x-kernl-accordion.item title="Accordion Item 2 Title" id="accordion-item-2">
Accordion Item 2 Content
</x-kernl-accordion.item>
</x-kernl-accordion.base>
label
= The aria-label for the accordionul
elementdefault-section
(optional) = Theid
of the accordion item that should be open by default
title
- The title that should be shown on the accordion buttonid
(optional) - The ID that should be assigned to the accordion. This should match thedefault-section
prop passed to the base accordion component for the accordion item that should be open by default.
To use the alert components, add the following markup to your Blade template.
<x-kernl-alert.contained
label="COVID warning"
class="absolute bottom-0 inset-x-0 py-4"
:closable="false"
:remember="true"
>
<p>Questions about campus opening and COVID-19 testing? Go here to get the latest...</p>
</x-kernl-alert.contained>
Alternatively, you can use the x-kernl-alert.full-width
component for a slightly different design.
<x-kernl-alert.full-width
label="COVID warning"
class="absolute bottom-0 inset-x-0"
:closable="false"
:remember="true"
>
<p>Questions about campus opening and COVID-19 testing? Go here to get the latest...</p>
</x-kernl-alert.full-width>
label
- Used for the aria-label and "remember" functionality. Should be unique across your site if using the "remember" functionality.closeable
(optional) - If true, show the close button. If false, do not show the close button. Default is true.remember
(optional) - If true, the component will use localStorage to remember when the user has closed the alert and will not show it again.
Any additional classes or attributes you put on the component will be passed through.
To use the With Offset Card Banner component, add the following markup to your Blade template.
<x-kernl-banners.with-offset-card
background-url=""
>
{{--Card content goes here--}}
</x-kernl-banners.with-offset-card>
background-url
- URL of background image to be applied.
To use the Bottom Title Banner component, add the following markup to your Blade template.
<x-kernl-banners.bottom-title
background-url=""
title=""
/>
background-url
- URL of background image to be applied.title
- Title to be presented.
To use the Solid Button and Outline Button components, add the following markup to your Blade template.
<x-kernl-button.solid color="dark">
Button Text
</x-kernl-button.solid>
<!-- or -->
<x-kernl-button.outline color="dark">
Button Text
</x-kernl-button.outline>
By default, the button components will render a button
element. If you need an anchor
element instead, just include the href
prop.
Any additional classes or attributes you put on the component will be passed through.
<x-kernl-button.solid color="light" class="rounded-full" @click="doSomething">
Button
</x-kernl-button.solid>
- color - The color the button should be. Options:
dark
,light
,medium-gray
,light-gray
,red
,blue
, andgreen
. - size - (optional) Determines if the button should be smaller or larger than the default size. Options:
small
andlarge
. - href - (optional) Determines if the button should be rendered as an anchor tag and where the anchor should link to.
To use the Carousel Base and Base Slide component, add the following markup to your Blade template.
<x-kernl-carousel.base>
<x-kernl-carousel.base.slide
:index="0"
background-classes="text-white bg-red-800"
>
Example carousel slide
<x-kernl-carousel.base.slide
:index="1"
background-classes="text-white bg-blue-800 bg-cover bg-no-repeat bg-center"
slot-classes="max-w-6xl"
style="background-image: url('...background-image-url')"
>
Example carousel slide with background image
</x-kernl-carousel.base.slide>
<!-- More slides -->
</x-kernl-carousel.base>
delay
- (optional) The delay that the slides should rotate at in milliseconds. Default value is 5000.
index
- The index of the slide. Each slide's index should increment by 1, starting at 0.background-classes
- (optional) Any classes you want to apply to the outer element.slot-classes
- (optional) Any classes you want to apply to the element around the slot.
Any additional attributes you add to the Base Slide component (style
, etc.), will be passed through to the background element.
To use the Split Carousel and Split Slide component, add the following markup to your Blade template.
<x-kernl-carousel.split height-classes="h-192 md:h-128 lg:h-96">
<x-kernl-carousel.split.slide :index="0" class="h-96 md:h-128 lg:h-96">
<div class="w-full flex items-center px-8 py-20 bg-black md:w-1/2 lg:w-2/3 lg:px-16">
<div>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Explicabo doloremque culpa iure cumque voluptatum! Iure provident eligendi ex. Quidem atque commodi vero facilis totam maxime alias, cum quod voluptate nulla!</p>
</div>
</div>
<img class="h-96 md:h-128 lg:h-96 w-full object-cover md:w-1/2 lg:w-1/3" src="...image-url">
</x-kernl-carousel.split.slide>
<!-- More slides -->
</x-kernl-carousel.split>
height-classes
- Classes to set the overall height on the carousel. Should be double each slide height when slides are stacked (mobile).delay
- (optional) The delay that the slides should rotate at in milliseconds. Default value is 5000.
index
- The index of the slide. Each slide's index should increase by 1, starting at 0.class
- Any classes you want to apply to the element around the slot. This should be used to pass in the height classes.
Any additional attributes you add to the Split Slide component (style
, etc.), will be passed through to the background element.
To use the Loader component, light or dark, add the following markup to your Blade template.
<div x-data="{ busy: true|false }" class="relative" >
{{-- Some other content --}}
<x-kernl-loaders.dark
x-show="busy"
/>
</div>
x-show
- (optional) Used to show/hide the loader based on an Alpine.js property
<div x-data="{ busy: true|false }" class="relative" >
{{-- Some other content --}}
<x-kernl-loaders.light
x-show="busy"
/>
</div>
x-show
- (optional) Used to show/hide the loader based on an Alpine.js property
To use the Solid Tag component, add the following markup to your Blade template.
<x-kernl-tags.solid
color="black|white|red|medium-gray|light-gray|blue|green|yellow"
:pill="true|false"
:uppercase="true|false"
>
{{-- Content here --}}
</x-kernl-tags.solid>
color
- Color for text/background. Default isdark
pill
- (optional) Rounds corners for a pill-like appearance. Default isfalse
uppercase
- (optional) Uppercase content. Default isfalse
To use the Outline Tag component, add the following markup to your Blade template.
<x-kernl-tags.outline
color="black|white|red|medium-gray|light-gray|blue|green|yellow"
:pill="true|false"
:uppercase="true|false"
>
{{-- Content here --}}
</x-kernl-tags.outline>
color
- Color for text/border. Default isdark
pill
- (optional) Rounds corners for a pill-like appearance. Default isfalse
uppercase
- (optional) Uppercase content. Default isfalse
To use the Base Modal component, add the following markup to your Blade template. The modal can be triggered from anywhere on your page using the NUModals.open
and NUModals.close
methods.
<x-kernl-modals.base
id="unique-modal-id"
:closeable="true|false"
:close-on-click-outside="true|false"
:close-on-escape-key="true|false"
>
{{-- Content here --}}
</x-kernl-modals.base>
<button x-data x-on:click="NUModals.open('unique-modal-id')">Open Modal</button>
<button x-data x-on:click="NUModals.close('unique-modal-id')">Close Modal</button>
id
- ID of the modal. Must be unique throughout the app. This ID can be used withwindow.NUModals
methodscloseable
- (optional) Adds close button at the top right corner.true
by defaultclose-on-click-outside
- (optional) Adds behavior to close when clicking outside the modal.true
by defaultclose-on-escape-key
- (optional) Adds behavior to close when pressing the Esc key.true
by default
To use the Local Footer component, add the following markup to your Blade template.
<x-kernl-footers.local
:links="$links"
logo-url=""
facebook-url=""
youtube-url=""
instagram-url=""
snapchat-url=""
linkedin-url=""
twitter-url=""
>
<x-slot name="logo">
{{-- Insert SVG logo here --}}
</x-slot>
<x-slot name="address">
{{-- Insert address here --}}
</x-slot>
</x-kernl-footers.local>
links
= Array of titles and links for the navigation sections of the footer. Each title can have achildren
key that's an array of more titles/links. These titles/links will be displayed below the parent title. Example:
$links = [
[
'text' => 'About',
'href' => '/about', // (optional)
'children' => [
[
'text' => 'Careers',
'href' => '/about/careers',
],
[
'text' => 'Staff',
'href' => '/about/staff',
],
],
],
// ... More links
];
logo-url
- (optional) URL for the footer logo.facebook-url
- (optional) Facebook URL for the footer. Adding the URL will display the respective social network icon.youtube-url
- (optional) Youtube URL for the footer. Adding the URL will display the respective social network icon.linkedin-url
- (optional) Linkedin URL for the footer. Adding the URL will display the respective social network icon.snapchat-url
- (optional) Snapchat URL for the footer. Adding the URL will display the respective social network icon.twitter-url
- (optional) Twitter URL for the footer. Adding the URL will display the respective social network icon.instagram-url
- (optional) Instagram URL for the footer. Adding the URL will display the respective social network icon.
To use the PreFooter component, use the following markup to your Blade Template. Note, for a multi-column layout the <x-kernl-footers.pre-footer.column> element will need to be wrapped in a foreach loop, or manually populated.
<x-kernl-footers.pre-footer.base
:columns="<integer value>"
>
<x-kernl-footers.pre-footer.column
:featherIcon="<string value>"
:title="<string value>"
:link="<link array>"
:description="<string value>"
>
</x-kernl-footers.pre-footer.column>
</x-kernl-footers.pre-footer.base>
columns
- (optional) Set the number of grid columns to display on large screens. Default is 3.
featherIcon
- (optional) Choose a Feather Icon from https://feathericons.com/ and enter the name of it here.title
- (required) The title of the PreFooter column.description
- (required) A description of the PreFooter column.link
- (required) This will be an array that must include a url, and optionally a target. Example:
$link = [
'url' => 'https://www.google.com',
'target' => '_blank'
]
<x-kernl-tabs.underlined :default-active="0">
<x-kernl-tabs.underlined.item title="Zero">
Content for panel zero
</x-kernl-tabs.underlined.item>
<x-kernl-tabs.underlined.item title="One">
Content for panel one
</x-kernl-tabs.underlined.item>
<x-kernl-tabs.underlined.item title="Two">
Content for panel two
</x-kernl-tabs.underlined.item>
</x-kernl-tabs.underlined>
default-active
- (optional) Index of the initial active tab. Default is 0 (zero).
title
- Title of the tab contents
Any additional classes or attributes you put on the item
component will be passed through.
<x-kernl-tabs.bordered :default-active="0">
<x-kernl-tabs.bordered.item title="Zero">
Content for panel zero
</x-kernl-tabs.bordered.item>
<x-kernl-tabs.bordered.item title="One">
Content for panel one
</x-kernl-tabs.bordered.item>
<x-kernl-tabs.bordered.item title="Two">
Content for panel two
</x-kernl-tabs.bordered.item>
</x-kernl-tabs.bordered>
default-active
- (optional) Index of the initial active tab. Default is 0 (zero).
title
- Title of the tab contents
Any additional classes or attributes you put on the item
component will be passed through.
<x-kernl-tabs.detached :default-active="0">
<x-kernl-tabs.detached.item title="Zero">
Content for panel zero
</x-kernl-tabs.detached.item>
<x-kernl-tabs.detached.item title="One">
Content for panel one
</x-kernl-tabs.detached.item>
<x-kernl-tabs.detached.item title="Two">
Content for panel two
</x-kernl-tabs.detached.item>
</x-kernl-tabs.detached>
default-active
- (optional) Index of the initial active tab. Default is 0 (zero).
title
- Title of the tab contents
Any additional classes or attributes you put on the item
component will be passed through.
<x-kernl-heroes.split-layout-content-media
media-url="https://media-url"
title="Title"
body="Body"
call-to-action="Call to Action"
call-to-action-url="https://call-to-action-url"
/>
{{-- OR --}}
<x-kernl-heroes.split-layout-content-media
media-url="https://media-url"
>
{{-- Your content --}}
</x-kernl-heroes.split-layout-content-media>
media-url
- Url of image to showtitle
- Title of contentbody
- Body of contentcall-to-action
- Call To Action button labelcall-to-action-url
- Url of call to action button
Any additional classes or attributes you put on the component will be passed through.
Note: when using the $slot version, title, body, call-to-action and call-to-action-url are not required.
<x-kernl-heroes.full-centered-content
title="Title"
subtitle="Title"
body="Body"
/>
{{-- OR --}}
<x-kernl-heroes.full-centered-content>
{{-- Your content --}}
</x-kernl-heroes.full-centered-content>
title
- Title of contentsubtitle
- Subtitle of contentbody
- Body of content
Any additional classes or attributes you put on the component will be passed through.
Note: when using the $slot version, title, body, call-to-action and call-to-action-url are not required.
<x-kernl-interior-navigation.base
title="About"
title-url="#"
:links="[
[
'text' => 'Our Staff',
'href' => '#',
],
[
'text' => 'Job Opportunities',
'expandable' => true,
'expanded' => true,
'children' => [
['text' => 'Part Time', 'href' => '#'],
['text' => 'Full Time', 'href' => '#'],
],
],
]"
/>
title
- Title for navigationtitle-url
- (optional) URL for navigationlinks
- Array of navigation items. Supports child navigation viachildren
key. Navigation items can have the following attributes:text
- Text for the navigation itemhref
- URL for the navigation itemactive
- Sets the navigation item as active. Default isfalse
children
- Child navigation for navigation itemsexpandable
- Sets whether the child navigation can be expanded/collapsed. Applies whenchildren
is used. Default isfalse
expanded
- Sets whether the child navigation is expanded or not by default. Applies whenexpandable
is used. Default isfalse
Any additional classes or attributes you put on the base
component will be passed through the root div component.
<x-kernl-cards.simple-link
title="Title Text"
body="Body Text"
color="red|light|light-gray|dark"
size="sm|default"
:with-footer="true|false"
footer-text="Footer Text"
url="https://www.google.com"
/>
{{-- OR --}}
<x-kernl-cards.simple-link
url="https://www.google.com"
:with-footer="true"
>
<x-slot name="main">
{{-- Main Content --}}
</x-slot>
<x-slot name="footer">
{{-- Footer Content --}}
</x-slot>
</x-kernl-cards.simple-link>
title
- Title textbody
- Body textcolor
- (optional) Background color of the card. Defaults to 'light'size
- (optional) Text size. Defaults to 'default':with-footer
- (optional) Shows/hides footer. Default is falsefooter-text
- Footer texturl
- URL to navigate on card click
Any additional classes or attributes you put on the component will be passed through.
Note: $slot version has two named slots: 'main' and 'footer'. Use them to override the main and footer content respectively.
<x-kernl-cards.simple-with-actions
title="Title text"
body="Body text"
color="red|light|light-gray|dark"
size="sm|default"
primary-action-text="Primary action text"
primary-action-url="https://www.google.com"
secondary-action-text="Secondary action text"
secondary-action-url="https://www.google.com"
/>
{{-- OR --}}
<x-kernl-cards.simple-with-actions
title="Title text"
body="Body text"
color="red"
color="red|light|light-gray|dark"
size="sm|default"
>
<x-slot name="main">
{{-- Main Content --}}
</x-slot>
<x-slot name="actions">
{{-- Actions Content --}}
</x-slot>
</x-kernl-cards.simple-with-actions>
title
- Title textbody
- Body textcolor
- (optional) Background color of the card. Defaults to 'light'size
- (optional) Text size. Defaults to 'default'primary-action-text
- Text displayed for Primary Actionprimary-action-url
- URL to navigate to when when the Primary Action is clickedsecondary-action-text
- (optional) Text displayed for Secondary Actionsecondary-action-url
- (optional) URL to navigate to when the Secondary Action is clicked
Any additional classes or attributes you put on the component will be passed through.
Note: $slot version has two named slots: 'main' and 'actions'. Use them to override the main and actions content respectively.
<x-kernl-cards.link-with-media
title="Title text"
body="Body text"
color="red|light|light-gray|dark"
aspect-ratio="1:1|16:9|4:5|5:4"
image-url="URL to image"
badge="Badge text"
orientation="vertical|horizontal|horizontal-flipped"
pre-header="Pre Header text"
:with-footer="true|false"
footer-text="Footer text"
url="URL for link"
/>
{{-- OR --}}
<x-kernl-cards.link-with-media
title="Title text"
body="Body text"
color="red|light|light-gray|dark"
aspect-ratio="1:1|16:9|4:5|5:4"
image-url="URL to image"
url="URL for link"
orientation="vertical|horizontal|horizontal-flipped"
badge="Badge text"
pre-header="Pre Header text"
:with-footer="true|false"
footer-text="Footer text"
>
<x-slot name="main">
{{-- Main Content --}}
</x-slot>
<x-slot name="footer">
{{-- Footer Content --}}
</x-slot>
</x-kernl-cards.link-with-media>
title
- Title textbody
- Body textcolor
- (optional) Background color of the card. Defaults to 'light'aspect-ratio
- (optional) Aspect ratio of image. Defaults to '16:9'image-url
- URL to imageurl
- URL to navigate to on clickorientation
- (optional) Orientation of image. Defaults to 'vertical'badge
- (optional) Badge textpre-header
- (optional) Pre header text:with-footer
- (optional) Shows/hides footer. Defaults to falsefooter-text
- (optional) Footer text
Any additional classes or attributes you put on the component will be passed through.
Note: $slot version has two named slots: 'main' and 'footer'. Use them to override the main and footer content respectively.
Note: The
@tailwindcss/aspect-ratio
plugin is required for the this component to work correctly. Please see documentation
<x-kernl-cards.link-with-media-and-actions
title="Title text"
body="Body text"
color="red|light|light-gray|dark"
aspect-ratio="1:1|16:9|4:5|5:4"
image-url="URL to image"
url="URL for link"
badge="Badge text"
orientation="vertical|horizontal|horizontal-flipped"
pre-header="Pre Header text"
primary-action-text="Primary action text"
primary-action-url="https://www.google.com"
secondary-action-text="Secondary action text"
secondary-action-url="https://www.google.com"
/>
{{-- OR --}}
<x-kernl-cards.link-with-media-and-actions
title="Title text"
body="Body text"
color="red|light|light-gray|dark"
aspect-ratio="1:1|16:9|4:5|5:4"
image-url="URL to image"
url="URL for link"
badge="Badge text"
orientation="vertical|horizontal|horizontal-flipped"
pre-header="Pre Header text"
>
<x-slot name="main">
{{-- Main Content --}}
</x-slot>
<x-slot name="actions">
{{-- Actions Content --}}
</x-slot>
</x-kernl-cards.link-with-media-and-actions>
title
- Title textbody
- Body textcolor
- (optional) Background color of the card. Defaults to 'light'aspect-ratio
- (optional) Aspect ratio of image. Defaults to '16:9'image-url
- URL to imageurl
- URL to navigate to on clickorientation
- (optional) Orientation of image. Defaults to 'vertical'badge
- (optional) Badge textpre-header
- (optional) Pre header textprimary-action-text
- Text displayed for Primary Actionprimary-action-url
- URL to navigate to when when the Primary Action is clickedsecondary-action-text
- (optional) Text displayed for Secondary Actionsecondary-action-url
- (optional) URL to navigate to when the Secondary Action is clicked
Any additional classes or attributes you put on the component will be passed through.
Note: $slot version has two named slots: 'main' and 'actions'. Use them to override the main and actions content respectively.
Note: The
@tailwindcss/aspect-ratio
plugin is required for the this component to work correctly. Please see documentation
<x-kernl-cards.event
title="Title text"
body="Body text"
url="URL for link"
image-url="URL to image"
color="light|light-gray|dark"
date="Date text"
time="Time text"
:with-footer="true|false"
footer-text="Footer text"
/>
{{-- OR --}}
<x-kernl-cards.event
title="Title text"
body="Body text"
url="URL for link"
image-url="URL to image"
color="light|light-gray|dark"
date="Date text"
time="Time text"
:with-footer="true|false"
>
<x-slot name="main">
{{-- Main Content --}}
</x-slot>
<x-slot name="footer">
{{-- Footer Content --}}
</x-slot>
</x-kernl-cards.event>
title
- Title textbody
- Body textdate
- Date to displaytime
- Time to displaycolor
- (optional) Background color of the card. Defaults to 'light'url
- URL to navigate to on click'image-url
- URL to image':with-footer
- (optional) Shows/hides footer. Defaults to falsefooter-text
- (optional) Footer text
Any additional classes or attributes you put on the component will be passed through.
Note: $slot version has two named slots: 'main' and 'footer'. Use them to override the main and footer content respectively.
Note: The
@tailwindcss/aspect-ratio
plugin is required for the this component to work correctly. Please see documentation
<x-kernl-selects.select
name="example-input"
:options="[
['value' => 'value_1', 'label' => 'Value 1', 'category' => 'SINGLE'],
['value' => 'value_2', 'label' => 'Value 2', 'category' => 'SINGLE'],
['value' => 'value_3', 'label' => 'Value 3', 'category' => 'MULTI'],
]"
:multiple="true|false"
placeholder="Placeholder text"
:listens="[
'category-changed' => ['filter' => 'category'],
]"
x-on:example-input-changed="someMethod($event.detail.value)"
/>
name
- Name of the input.:options
- Array of options to select. Must include at leastvalue
andlabel
keys.:multiple
- (optional) Allow multiple options to be selected. Defaults to false.placeholder
- (optional) Text to be presented when no selection has been made.:listens
- (optional) Allows to filter options automatically when some other select input changes. Keyed array must have keys forinput-changed
event andfilter
with the desired attribute to filter options. Eg: whencategory-changed
is received,:options
will be filtered with the value present incategory
for each option.x-on:{input-name}-changed
- (optional) Listen for a change on the dropdown.
Any additional classes or attributes you put on the component will be passed through.
Note: The
@tailwindcss/forms
plugin is required for the this component to work correctly. Please see documentation
<x-kernl-paginators.base
:number-of-pages="available pages"
:current-page="current page"
mode="php|js"
pagination-url="url for pagination"
query-param-name="name of page query param"
:appends="extra values for pagination"
emits="name of the event to emit"
/>
:number-of-pages
- Number of available pages for pagination.:current-page
- Initial selected page.mode
- (optional)php
orjs
. Defaults tophp
.pagination-url
- (php
mode only) Base URL used for pagination links.query-param-name
- (optional -php
mode only) Name of the page query parameter. Defaults topage
.:appends
- (optional -php
mode only) Keyed array of extra query parameters to attach to the pagination URL.emits
- (optional -js
mode only) Name of event dispatched when switching pages.
When listening for the page-changed event in js
mode, you may access the new page via $event.detail.page
.