flux:publish command allows you to publish Flux component Blade templates to your application’s resources/views/flux directory. This enables you to customize component markup and styling.
Usage
Arguments
One or more component names to publish. If not provided, you’ll be prompted to select components interactively.
Options
Enable multi-select mode in the interactive prompt, allowing you to select multiple components at once.
Publish all available Flux components (both free and Pro if installed).
Overwrite existing published components. By default, the command skips files that already exist.
Available Components
Free Components
- Accent -
accent - Avatar -
avatar - Badge -
badge - Brand -
brand - Breadcrumbs -
breadcrumbs - Button -
button - Callout -
callout - Card -
card - Checkbox -
checkbox - Dropdown -
dropdown,menu,navmenu - Field -
fieldset,legend,field,label,description,error - Heading -
heading,subheading,text,link - Icon -
icon - Input -
input - Layout -
header,sidebar,aside,main,footer,container,brand,profile,spacer - Modal -
modal - Navbar -
navbar,navlist - Otp -
otp - Radio -
radio - Separator -
separator - Select -
select - Skeleton -
skeleton - Switch -
switch - Textarea -
textarea - Tooltip -
tooltip - Typography -
heading,subheading,text,link
Pro Components
Pro components are only available if you have
livewire/flux-pro installed.- Accordion -
accordion - Autocomplete -
autocomplete - Calendar -
calendar - Chart -
chart - Checkbox -
checkbox - Command -
command - Composer -
composer - Context -
context - Date picker -
date-picker - Editor -
editor - File upload -
file-upload,file-item - Kanban -
kanban - Pillbox -
pillbox - Popover -
popover - Select -
select - Slider -
slider - Tabs -
tabs,tab - Table -
table,pagination - Time picker -
time-picker - Toast -
toast
Examples
Interactive single selection
Interactive multi-selection
Publish specific components
Publish all components
Force overwrite existing files
--force, if the file already exists:
How It Works
Component selection
Based on your arguments or options, the command determines which components to publish. If using interactive mode, you’ll search and select from available components.
Directory creation
The command ensures the
resources/views/flux directory exists in your application.File publishing
For each selected component, the command:
- Locates the component stub files (from either free or Pro packages)
- Copies the Blade template(s) to your
resources/views/fluxdirectory - Skips existing files unless
--forceis specified
Published File Location
All published components are placed in:- Dropdown publishes:
dropdown.blade.php,menu.blade.php,navmenu.blade.php - Field publishes:
fieldset.blade.php,legend.blade.php,field.blade.php,label.blade.php,description.blade.php,error.blade.php