Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Form Components Laravel Package

rawilk/laravel-form-components

A set of reusable Blade form components for Laravel that make building consistent forms quick and clean. Includes inputs, selects, checkboxes, radios, buttons, errors, and styling-friendly markup, with flexible config and easy customization.

View on GitHub
Deep Wiki
Context7

title: Checkbox Group sort: 5

Introduction

The checkbox group allows you to quickly group related checkboxes or radio buttons together in your forms. This is not a replacement for the form-group component, and should be used inside the form-group component in your forms.

Basic Usage

The most basic usage is like this:

<x-checkbox-group>
    <x-checkbox />
    <x-checkbox />
</x-checkbox-group>

This will stack the checkboxes on top of each other.

Inline Groups

By default, the checkbox-group is designed to stack your checkboxes and radio inputs, but you can display them inline with each other, by setting the stacked attribute to false. This will display the checkboxes in rows of 3 columns.

<x-checkbox-group :stacked="false">
    <x-checkbox />
    <x-checkbox />
</x-checkbox-group>

Inline Group Columns

By default, the checkbox-group renders checkboxes in rows with 3 columns when it is rendered inline. To render a different amount of columns, you can specify the grid-cols attribute:

<x-checkbox-group :stacked="false" grid-cols="5"> ... </x-checkbox-group>

Sizing

For convenience, you can size all the radio or checkbox elements the same by using the inputSize attribute. If no size is provided, it will use the config value for radios and checkboxes.

<x-checkbox-group input-size="lg"> ... </x-checkbox-group>

For more information on the sizing, checkout the Sizing documentation for checkboxes.

API Reference

props

prop description
stacked A boolean value indicating if the elements should be stacked, or placed in grid columns. Defaults to true
gridCols The number of grid columns to use for the elements. Requires stacked to be true. Defaults to 3
inputSize The size to make all child inputs. Defaults to the config size for choice.

config

The following configuration keys and values can be adjusted for common default behavior you may want for the checkbox-group element.

'defaults' => [
    'choice' => [
        // Supported: 'sm', 'md', 'lg' (defaults to 'sm' if null)
        'size' => null,
    ],
],
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity