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: Label sort: 2

Introduction

The label component is a small and practical component to use in your forms. When you set the for attribute, it'll generate a label tag for a subsequent input field with the same id attribute.

This isn't a component you will usually reach for, as in most cases you will probably want to use the form-group component to render the label and errors automatically for you, but this component is available to use for other use cases you may have.

{note} All labels will be provided an id with Alpine's $id magic helper. This helps certain components like custom-select provide accurate accessibility attributes when in a form-group.

Requirements

Since the label makes use of Alpine's $id magic helper, you will need Alpine.js installed. All labels will get the following attribute applied:

:id="$id('fc-label')"

If the ID is not setting on the label, ensure you are placing the label inside some kind of x-data scope.

See Third-Party Assets on the installation guide for further setup information.

Basic Usage

The most basic usage of the component is as follows:

<x-label for="first_name" />

It's important to note that only keys with _ are supported and no camelCased or other variants. You can of course provide your own label in the default slot:

<x-label for="first_name">My custom label</x-label>

API Reference

props

prop description
for The name (or id) of the input element the label is for.
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