Components

Form

Accessible, composable Blade components for building forms. All components live under the x-pajak-form namespace. Labels, hints, and validation messages are built into each component via props.

Form

A <form> wrapper that handles CSRF injection, method spoofing (PUT, PATCH, DELETE), and renders a translatable submit button automatically. Supports three layout modes via the :layout prop: Stacked (default), Inline (label beside field), and Sectioned (two-column sections with x-pajak-form::section).

Default (POST)
Custom submit label & size
PUT - method spoofing
DELETE - small submit
Inline layout
Sectioned layout
Async - redirect on success
Async - success & error events
Async - extra data via PajakForm API

Group

A layout wrapper for form fields. Stacks fields vertically with consistent spacing by default. Add :inline="true" to place fields side by side in equal-width columns. Use it when grouping fields outside of a <x-pajak-form::form> - for example, inside a modal or sidebar panel.

Vertical stack (default)
Inline row
Mixed field types

Section

A two-column section divider for use inside a FormLayout::Sectioned form. The left column holds a title and optional description; the right column is the field body slot. Sections are separated by a horizontal border automatically. Can also be used standalone outside a form.

Inside sectioned form
Standalone

Input

A single-line text field. Supports all HTML input types, three sizes, three states, and an optional leading icon slot.

Sizes
States
With icon
Pre-filled value
Inline error
Please enter a valid email address.

Email

A convenience wrapper around x-pajak-form::input with type="email". Accepts all the same props as Input. Defaults autocomplete to 'email'.

Default
States

Password

A password input with a visibility toggle. Pass :confirmation="true" to render an inline confirmation field below it.

Default
With confirmation
Inline error
Password must be at least 8 characters.
Confirmation with error
Passwords do not match.
Sizes

Number

A convenience wrapper around x-pajak-form::input with type="number". Pass min, max, and step directly as HTML attributes.

Default
States

Tel

A convenience wrapper around x-pajak-form::input with type="tel". Accepts all the same props as Input. Pass a TelPattern enum case for built-in locale patterns and placeholders.

Default
With TelPattern
States

Url

A convenience wrapper around x-pajak-form::input with type="url". Accepts all the same props as Input.

Default
States

Hidden

A hidden input for passing data with a form without rendering any UI.

Default

Textarea

A resizable multi-line text field. Accepts the same state modifiers as Input.

States
Success state
Pre-filled & custom rows
Inline error
This field is required.

Select

A custom-styled select backed by a native <select>. Supports single select, searchable, option groups with metadata, and multiselect with dismissible chips. JavaScript upgrades the trigger and dropdown while keeping the native element accessible and form-submittable.

Default
Searchable
Grouped with metadata
Multiselect
Pre-selected value
Error state
Please select a plan.
Disabled

Checkbox

A styled checkbox with an optional label and description. Pass :checked="true" to pre-check it, and :disabled="true" to disable.

Variants
Array group
Error state
You must accept the terms to continue.

Radio

Standard radio buttons. Group them by sharing the same name. Supports labels, descriptions, and disabled state.

Group
Error state
Please select a plan.

Radio Card

A card-style radio button. Great for plan or option pickers where you need more visual weight than a plain radio.

Group
With slot content

Toggle

A switch/toggle control. Uses a hidden checkbox as the underlying input, so it participates in forms normally. Three sizes: sm, md, lg.

Sizes & states
Without label
Error state
You must enable notifications to continue.

Repeater

A dynamic field group that lets users add and remove rows of inputs. Write plain field-key names inside the slot - the component automatically composes name, id, and for attributes into array notation for both server-rendered rows and dynamically added rows.

Basic
With label & multiple fields
Links
Min & max constraints
Email addresses

Slider

A draggable range control. Supports single and range (two-thumb) modes, an optional value bubble, label, suffix, disabled state, and inline error message.

Default
40
With label
60 %
Value bubble
75 %
Range
20 €
80 €
Disabled
50
25
75
Error state
0
Please select a value greater than 0.

File

A styled <input type="file">. Displays the selected filename inline. No JavaScript required.

Default
With accept filter
Error state
The file must be smaller than 2 MB.
Disabled

Dropzone

A drag-and-drop upload zone with a file list. Supports single and multiple file modes. Works with standard HTML form submission - no async upload required. Pre-populate files via the :files prop for edit forms.

Default (multiple)
Drop files here or click to upload Supports any file type
Single file
Drop files here or click to upload Supports any file type
With accept filter
Drop files here or click to upload Supports any file type
Pre-populated (edit form)
Drop files here or click to upload Supports any file type
contract.pdf 209.0 KB
invoice.pdf 193.4 KB
Error state
Drop files here or click to upload Supports any file type
At least one document is required.
Disabled
Drop files here or click to upload Supports any file type
contract.pdf 209.0 KB

Avatar

A circular image upload with an initials fallback. Suitable for profile photos. Clicking the circle or the upload button opens the file picker. Standard form submission - no async upload.

Default (initials fallback)
Profile photo
JK
With existing image
Profile photo
JK
Error state
Profile photo
JK
Please upload a valid image.
Disabled
Profile photo
JK

Image Grid

A thumbnail grid for multiple image uploads. Selected images appear immediately as previews. Works with standard form submission. Pre-populate with existing images via the :images prop for edit forms.

Default
Photos
Add image
Pre-populated (edit form)
Receipt photos
receipt_1.jpg
receipt_2.jpg
receipt_3.jpg
Add image
Error state
Photos
Add image
At least one photo is required.
Disabled
Receipt photos
receipt_1.jpg
receipt_2.jpg