LaraReact Dashboard Template is a Laravel Inertia and React-based web application template designed with inspiration from Sakai PrimeReact for creating modern and interactive dashboard applications. This template provides you with a solid foundation for building powerful web applications with features such as:
LaraReact Dashboard Template is aimed at Laravel developers who want to kickstart their project development with a ready-made template that incorporates these technologies.
To get started with LaraReact Dashboard Template first clone the LaraReact Dashboard Template repository.
Clone Repository:
git clone https://github.com/boadusamuel/laravel-inertia-react
$ npm install
$ npm run dev
$ cp .env.example .env
$ composer install
$ php artisan key:generate
$ php artisan serve
The AppConfig
component is a React component designed to provide a user interface for configuring the layout settings of the project. It utilizes the PrimeReact library for UI components and leverages context provided by the LayoutContext
and PrimeReactContext
to manage and apply configuration changes.
The AppConfig
component provides a convenient way to access and customize the layout settings directly from the dashboard interface. Follow these steps to utilize the AppConfig button:
Navigate to the Dashboard:
Locate AppConfig Button:
Click the AppConfig Button:
Adjust Configuration Options:
Preview Changes:
Apply Theme:
Close AppConfig Sidebar:
The AppConfig
component provides a sidebar with various configuration options that can be adjusted to customize the project's layout and appearance. These options include:
The "Scale" section allows users to adjust the font size of the application. Users can increment or decrement the scale and visualize the changes in real-time.
The "Menu Type" section provides options to select the layout's menu mode. Users can choose between "Static" and "Overlay" menu types, influencing the navigation experience.
The "Input Style" section lets users choose between "Outlined" and "Filled" input styles, influencing the appearance of input fields in the application.
The "Ripple Effect" section includes a toggle switch to enable or disable the ripple effect on user interactions.
The "Themes" section categorizes available themes into different design systems:
For each design system, multiple theme options are provided, each represented by a button with a preview image. Clicking on a theme button applies the selected theme and color scheme to the application.
Feel free to explore and customize these options according to the desired look and feel of the "use client" project.
Once you have chosen a preferred theme, follow these steps to integrate the selected theme into the app.blade.php
file:
Choose a Theme:
Navigate to app.blade.php:
app.blade.php
file in your project's resources/views
directory.Paste Link in Head Section:
app.blade.php
file and locate the <head>
section.<link>
tag with id="theme-css"
within the <head>
section. It should look something like this with your selected theme:<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title inertia>{{ config('app.name', 'LaraReact') }}</title>
<!-- Scripts -->
@routes
@viteReactRefresh
@vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"])
@inertiaHead
<link id="theme-css" href={{asset('/themes/lara-light-indigo/theme.css')}} rel="stylesheet"></link>
</head>
<body class="font-sans antialiased">
@inertia
</body></html>
Set the Chosen theme inside the LayoutProvider
within the layoutcontext
component
const [layoutConfig, setLayoutConfig] = useState({
ripple: false,
inputStyle: 'outlined',
menuMode: 'static',
colorScheme: 'light',
theme: 'tailwind-light',
scale: 14
});
Delete Unwanted Themes:
images/layout/themes
folder.Save Changes:
app.blade.php
file.By following these steps, you have successfully integrated the selected theme into the main layout of your application. Remember to clean up the unwanted themes to maintain a tidy project structure.
NB: This project is still under development please report any bugs to the issue section of this repo