Skip to content

laravilt/schemas

schemas

Laravilt Schemas

Latest Stable Version License Downloads Dependabot Updates PHP Code Styling Tests

Complete schema system with sections, tabs, grids, and layout components for Laravilt. Organize form fields and information displays with powerful layout components.

Features

  • πŸ“¦ 8 Layout Components - Section, Tabs, Grid, Fieldset, Split, Wizard, Step, Columns
  • 🎨 Section Features - Collapsible, icons, headers, footers, aside layout
  • πŸ“‘ Tab Features - Multiple tabs, icons, badges, lazy loading
  • πŸ“ Grid Features - 1-12 column layouts, responsive spans
  • ⚑ Reactivity - Conditional visibility, dynamic fields, state management
  • πŸ”„ Nested Schemas - Support for deeply nested layouts

Layout Components

Component Description
Section Collapsible sections with headings and icons
Tabs Tabbed interfaces with badges
Grid Responsive multi-column layouts
Fieldset HTML fieldset grouping
Split Two-column responsive layouts
Wizard Multi-step form workflows
Step Individual wizard steps
Columns Simple two-column wrapper

Quick Examples

Section with Columns

use Laravilt\Schemas\Components\Section;
use Laravilt\Forms\Components\TextInput;

Section::make('Product Information')
    ->description('Basic product details')
    ->icon('Package')
    ->columns(2)
    ->collapsible()
    ->schema([
        TextInput::make('name')->required(),
        TextInput::make('sku')->required(),
        TextInput::make('price')->numeric()->prefix('$'),
        TextInput::make('stock')->numeric(),
    ]);

Tabs

use Laravilt\Schemas\Components\Tabs;
use Laravilt\Schemas\Components\Tab;

Tabs::make('product_tabs')
    ->tabs([
        Tab::make('details')
            ->label('Details')
            ->icon('FileText')
            ->schema([...]),

        Tab::make('pricing')
            ->label('Pricing')
            ->icon('DollarSign')
            ->badge(fn ($record) => $record?->has_discount ? 'Sale' : null)
            ->schema([...]),
    ]);

Wizard

use Laravilt\Schemas\Components\Wizard;
use Laravilt\Schemas\Components\Step;

Wizard::make()
    ->steps([
        Step::make('account')
            ->label('Account')
            ->icon('User')
            ->schema([...]),

        Step::make('profile')
            ->label('Profile')
            ->icon('Settings')
            ->schema([...]),
    ])
    ->skippable();

Installation

composer require laravilt/schemas

Generator Command

php artisan make:schema ProductSchema

Documentation

License

The MIT License (MIT). Please see License File for more information.

About

Complete schema system with sections, tabs, grids, and layout components for Laravilt. Organize form fields and information displays with powerful layout components.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors