> Source: https://laravilt.com/docs/schemas/components/fieldset

# Fieldset

Wraps fields in HTML fieldset with legend.

## Basic Usage

```php
<?php

use Laravilt\Schemas\Components\Fieldset;
use Laravilt\Forms\Components\TextInput;

Fieldset::make('Contact Information')
    ->schema([
        TextInput::make('email'),
        TextInput::make('phone'),
    ]);
```

## With Label

```php
<?php

Fieldset::make('shipping')
    ->label('Shipping Address')
    ->schema([
        TextInput::make('street'),
        TextInput::make('city'),
    ]);
```

## With Legend

```php
<?php

Fieldset::make('billing')
    ->legend('Billing Information')
    ->schema([
        TextInput::make('card_number'),
        TextInput::make('expiry'),
    ]);
```

## Without Legend

```php
<?php

Fieldset::make()
    ->schema([
        TextInput::make('field1'),
        TextInput::make('field2'),
    ]);
```

## Methods

| Method | Description |
|--------|-------------|
| `make(?string)` | Create fieldset |
| `label(string\|Closure)` | Set label |
| `legend(string\|Closure)` | Set legend (alias) |
| `schema(array)` | Child components |
| `getLabel()` | Get label |
| `getLegend()` | Get legend |
| `getSchema()` | Get schema |

## Related

- [Section](https://github.com/laravilt/laravilt/blob/HEAD/docs/schemas/components/section) - Grouped content
- [Grid](https://github.com/laravilt/laravilt/blob/HEAD/docs/schemas/components/grid) - Multi-column layout
