Installation
NPM Package
npm install @omnitend/dashboard-for-laravel
Composer Package
Install the PHP helpers:
composer require omnitend/dashboard-for-laravel
Import Styles
Import the built CSS once in your app entry (e.g., resources/js/app.ts or main.ts):
// resources/js/app.ts
import '@omnitend/dashboard-for-laravel/theme.css'
This ships Bootstrap styles plus component styles in one bundle.
Import Components
Import components as needed:
import { DButton, DCard, useForm } from '@omnitend/dashboard-for-laravel'
Or import everything:
import * as Dashboard from '@omnitend/dashboard-for-laravel'
TypeScript Support
The library includes full TypeScript declarations. Types are automatically available when you import components.
import type { FieldDefinition, UseFormReturn } from '@omnitend/dashboard-for-laravel'
Laravel Integration
Register Service Provider
The service provider is auto-discovered, but you can manually register it in config/app.php:
'providers' => [
// ...
OmniTend\LaravelDashboard\LaravelDashboardServiceProvider::class,
],
Use PHP Utilities
use OmniTend\LaravelDashboard\Http\Requests\BaseFormRequest;
use OmniTend\LaravelDashboard\Traits\HasApiResponses;
class UserController extends Controller
{
use HasApiResponses;
public function store(CreateUserRequest $request)
{
$user = User::create($request->validated());
return $this->success($user, 'User created successfully');
}
}
Verifying Installation
After importing the CSS in your entry file, create a component to verify everything works:
<script setup lang="ts">
import { DButton } from '@omnitend/dashboard-for-laravel'
</script>
<template>
<DButton variant="primary">
It works!
</DButton>
</template>
If you see a styled blue button, you’re all set.
Browser support
The theme targets browsers from late 2023 on (Baseline 2023): Safari 17, Chrome and Edge 105, Firefox 121, and later. Older browsers still render every component, with these differences:
- Safari 16 (and Firefox before 107) ignores
contain-intrinsic-inline-size, so a DXStatCard sized to its content (a flex item that does not grow, an inline-block, acol-auto) gives its value no room and the value runs out of the card. A card given a width (a grid column,flex: 1) is unaffected. Safari 16 also ignoressize-adjuston@font-face, so tabular digits (IBM Plex Sans) stand about 5.5% taller than the letters beside them. - Before Safari 16, Chrome 105 and Firefox 110 there are no container
queries: DXStatCard’s value starts at 1.75rem rather than at the
width-based size it uses before its script runs, and the script then
shrinks a long value to fit as in any other browser. DXDashboardNavbar
always shows the search’s
kbdhint. - Firefox before 121 has no
:has(), so the refinements that use it fall back to the plainer layout: for example, display-only rows in a horizontal DXForm keep the top alignment instead of lining up with the label’s baseline, and a DXStackingTable.dx-stack-continuerow is not fully joined to the card above it.
The package ships no browserslist; transpile your own app for the browsers you support.
Next Steps
- Getting Started Guide - Learn core concepts
- Theming Guide - Customise the theme
- Component Reference - Browse available components
- Contributing Guide - Development setup and contributing