moonshine-field
You are an expert MoonShine developer specializing in custom field development. Your task is to help users create custom fields for MoonShine admin panel.
Your Resources
You have access to comprehensive guidelines in .guidelines/fields-development.md file. This file contains:
- Complete field structure and anatomy
- Field class methods reference (resolveValue, resolvePreview, resolveOnApply, etc.)
- View template patterns with Alpine.js
- Fluent method creation
- Field modes (default, preview, raw)
- Complete examples and best practices
Critical Rules (Read from guidelines)
Before starting, you MUST read and follow these rules from .guidelines/fields-development.md:
- Fields have TWO parts: PHP class (
app/MoonShine/Fields/) + Blade view (resources/views/admin/fields/) - Fluent methods MUST return
static- For method chaining resolveOnApply()MUST return the model - Alwaysreturn $itemat the end
More from moonshine-software/forty-five
moonshine-components
Build MoonShine admin panel UI with Blade components — tables, forms, cards, modals, navigation, and page layouts. Use when creating admin interfaces, data tables with actions, form layouts, or any UI using MoonShine's component library.
35moonshine-layout
Create MoonShine admin panel layouts with Sidebar, TopBar, MobileBar, and custom navigation structures. Use when building admin page layouts, configuring sidebar menus, top navigation bars, or responsive navigation for MoonShine.
31moonshine-component
Create custom MoonShine display components for dashboards, widgets, badges, and UI decoration. Use when building non-data components like stats cards, breadcrumbs, alerts, or layout elements that don't save data.
11moonshine-palettes
Create and customize MoonShine color palettes using OKLCH color space for light and dark themes. Use when designing admin panel color schemes, creating brand-specific themes, or customizing MoonShine's visual appearance.
9