Search by

monstm / starkit-laravel

samy

Starkit admin dashboard template for Laravel applications.

Package info

gitlab.com/monstm/starkit-laravel

Issues

pkg:composer/monstm/starkit-laravel

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

1.0.0 2026-12-05 09:48 UTC

This package is auto-updated.

Last update: 2026-12-05 10:06:12 UTC


README

Laravel package that provides the Starkit admin dashboard template as Blade components and Tailwind v4 styles.

The package is not a standalone application. Your Laravel application supplies its own routes, data, models, authentication, and authorization.

Requirements

  • PHP 8.3 or newer
  • Laravel 13
  • Tailwind CSS v4 and Vite in your application (tailwindcss, @tailwindcss/vite, vite, and laravel-vite-plugin; a new Laravel application already has them)

Installation

1. Install the package

composer require monstm/starkit-laravel

The service provider is discovered automatically.

2. Install the npm packages

npm install alpinejs @monstm/data-dom @fortawesome/fontawesome-free chart.js
PackageNeeded for
alpinejsRequired: interactive state
@monstm/data-domRequired: click-driven data-* behaviour
@fortawesome/fontawesome-freeIcons: the components use Font Awesome classes
chart.jsOnly for sk-chart and sk-sparkline (<x-starkit::chart> and <x-starkit::sparkline>)

3. Publish the package files

php artisan vendor:publish --tag=starkit

This is the basic set: the logo and favicon, the config, the colour themes, and the partial views. See Publish tags for the others.

4. Set up the CSS

In resources/css/app.css:

@import 'tailwindcss';
@import '@fortawesome/fontawesome-free/css/all.css' layer(base);
@import '../../vendor/monstm/starkit-laravel/resources/css/starkit.css';

/* Your palette overrides. Import after starkit so they win. */
@import './themes/primary.css';
@import './themes/dominant.css';
@import './themes/success.css';
@import './themes/info.css';
@import './themes/warning.css';
@import './themes/danger.css';

/* Tell Tailwind where the package classes are, because it skips vendor/ by default. */
@source '../../vendor/monstm/starkit-laravel/resources/views';
@source '../../vendor/monstm/starkit-laravel/src';

Import Font Awesome into the base layer, so that Tailwind utilities on an icon (width, size) win over the Font Awesome defaults.

5. Set up the JavaScript

In resources/js/app.js:

import Alpine from 'alpinejs';
import { init as initDataDom } from '@monstm/data-dom';
import Chart from 'chart.js/auto';
import '../../vendor/monstm/starkit-laravel/resources/js/starkit.js';

window.Alpine = Alpine; // before Alpine.start()
window.Chart = Chart; // only for sk-chart and sk-sparkline
Alpine.start();
initDataDom();

Leave out the two Chart lines if you did not install Chart.js.

6. Create a page

For example resources/views/dashboard.blade.php:

<x-starkit::layout title="Dashboard">
    <h1 class="text-2xl font-bold">Dashboard</h1>
    <x-starkit::button text="Save" />
</x-starkit::layout>

Add a route for it in routes/web.php:

Route::view('/dashboard', 'dashboard');

Then build the assets with npm run dev or npm run build.

Publish tags

Run php artisan vendor:publish --tag=<tag>.

TagContentsDestination
starkitBasic set: assets, config, themes, and partialsSee the rows below
starkit-allEverything: the basic set and the component viewsSee the rows below
starkit-assetsDefault logo and faviconpublic/starkit/
starkit-configPackage configconfig/starkit.php
starkit-themesColour themes: primary, dominant, success, info, warning, dangerresources/css/themes/
starkit-partialsSidebar, navbar, footer, notification menu, user menu, dark mode scriptresources/views/vendor/starkit/partials/
starkit-componentsAll component views, including the layouts blank, full-sidebar, and full-navbarresources/views/vendor/starkit/components/

The layouts load the logo and the favicon from public/starkit/, so publish at least starkit-assets.

A published view replaces the package view, so later package updates do not reach it. Compare your copy with the package view after an update.

After a package update

Publish the assets again:

php artisan vendor:publish --tag=starkit-assets --force

Do not use --force with starkit, starkit-all, or starkit-components unless you want to lose your changes to the published config, themes, and views. --force on starkit-assets also overwrites the files in public/starkit/, so keep your own logo and favicon under another path.

Configuration

Set these in .env, or edit the published config/starkit.php.

VariableConfig keyDefault
STARKIT_LAYOUT_TYPElayout.typefull-sidebar
STARKIT_LOGObrand.logostarkit/logo.webp
STARKIT_FAVICONbrand.faviconstarkit/favicon.ico
STARKIT_LOADING_ICONloading_iconfa-solid fa-spinner fa-spin
STARKIT_TOAST_POSITIONtoast.positiontop-right
STARKIT_TOAST_MAXtoast.max3

The logo and the favicon take a path under public/ or a full URL. The brand name is config('app.name').

Customisation

Colours

Edit the published files in resources/css/themes/, for example --color-primary-600. starkit.css already includes the default colours, so the application also works without the theme imports.

Sidebar, navbar, and footer

The partials hold example content: menu, notifications, user menu, and footer. Replace it with your own in resources/views/vendor/starkit/partials/. The user menu avatar is loaded from ui-avatars.com; allow that host if you use a Content Security Policy and keep the example.

Text

Built-in text of a component can be replaced through its props; text with a value in it uses %s. Text in the layouts and partials goes through __(), with the English text as the key.

JavaScript

window.Starkit holds the toast functions, escapeHtml, and two override points. Change them before Alpine.start():

  • Starkit.defaults.apiTable and Starkit.defaults.searchableSelect: data adapter defaults (headers, params, parse, map, request, and format for the API table). A component's own config is merged over them.
  • Starkit.darkMode: replace get() and set(dark) to keep the dark mode choice somewhere other than localStorage. Publish the partials/dark-mode-script view and change it too, because it reads the choice before the first paint.
window.Starkit.defaults.apiTable.headers = { Authorization: 'Bearer ...' };
window.Starkit.defaults.apiTable.format = {
    name: (value) => `<strong>${window.Starkit.escapeHtml(value)}</strong>`,
};

An API table format returns HTML, so it must escape user data with Starkit.escapeHtml.

Components

Use a component as <x-starkit::name>. Props, slots, and examples of every component, and the toast service, are in COMPONENTS.md.

GroupComponents
Layoutlayout, sidebar-section, sidebar-group, sidebar-item, dark-mode-toggle
Actionsbutton, button-group, link, social-button
Data displayaccordion, avatar, badge, card, list, timeline, chart, sparkline
Feedbackalert, empty-state, progress-bar, skeleton, spinner, toast-container
Formsinput, textarea, select, searchable-select, checkbox, radio, switch, input-group, floating-label, otp-input, date-range-picker, file-upload
Tablestable, data-table, api-table, tree-table
Navigationbreadcrumb, pagination, stepper, tab
Overlaysmodal, drawer, dropdown, popover, tooltip, command-palette

If a coding agent works on your application, add this to its instruction file (AGENTS.md or CLAUDE.md):

<!-- packages:starkit-laravel:begin -->
UI uses monstm/starkit-laravel. Before writing UI markup, read
vendor/monstm/starkit-laravel/COMPONENTS.md and use <x-starkit::...> components.
<!-- packages:starkit-laravel:end -->

License

MIT