# [Usage](../../../usage.md) > [Components](../basics.md) > [Visuals](../basics.md) > Fieldset

Bordered sub-group with legend for clustering related fields inside a [Form](../forms/form.md). Use it to split long forms into readable sections; use [Card](card.md) for standalone page sections and [Tabs](tabs.md) when sections should switch rather than stack.

![image](img/fieldset_1.png)

```php
{!!
    \KFramework\Components\Visual\Fieldset::make('Fieldset')
        ->setSchema([
                \KFramework\Components\Forms\Input::make()
                    ->setLabel('Input 1')
                    ->setColumnSpan(1),
                \KFramework\Components\Forms\Input::make()
                    ->setLabel('Input 2')
                    ->setColumnSpan(2)
            ])
        ->setColumns(3)
!!}
```

**End-to-end example:** address block inside a customer form.
```php
// Blade:
{!!
    \KFramework\Components\Visual\Fieldset::make('Address')
        ->setColumns(3)
        ->setSchema([
            \KFramework\Components\Forms\Input::make('street')->setLabel('Street')->setColumnSpan(2),
            \KFramework\Components\Forms\Input::make('zip')->setLabel('ZIP')->setColumnSpan(1),
        ])
        ->setValues($customer ?? [])
!!}

// Controller:
use KFramework\Components\Forms\Input;
use KFramework\Components\Visual\Fieldset;

$address = Fieldset::make('Address')
    ->setColumns(3)
    ->setSchema([
        Input::make('street')->setLabel('Street'),
        Input::make('zip')->setLabel('ZIP'),
    ]);

return view('customers.edit', compact('address'));
```

---
## Usage

- Blade:
```php
{!! \KFramework\Components\Visual\Fieldset::make() !!}
```
- Controller:
```php
{!! Fieldset::make() !!}
```

---
## Standard attributes

- `uuid`
- `id`
- `classes`
- `extraAttributes`
- `name` || `label`
  - This will set the name/label of the fieldset. `name` overrides `label`.
- `schema` — child inputs rendered inside the bordered group.
- `content`
- `values` — `name => value` map used to prefill the grouped fields.
- `defaults`
- `columns`
- `columnSpan`

See their usage and description [here](../basics.md).

## Action rows

```php
{!!
    \KFramework\Components\Visual\Fieldset::make()
        ->setColumns(2)
        ->setClasses(['fieldset-actions-end'])
        ->setSchema([
            \KFramework\Components\Visual\Button::make()->setLabel('Reset'),
            \KFramework\Components\Visual\Button::make()->setLabel('Clear'),
        ])
!!}
```

With `columns` the grouped fields share one grid row. With the `fieldset-actions-end` class the row is right-aligned, which suits reset and destructive actions placed above the fields they affect.

## See also
- [Components basics](../basics.md)
- [Form](../forms/form.md), [Card](card.md), [Tabs](tabs.md)
- [schema](../shared_attributes/schema.md), [columns](../shared_attributes/columns.md), [values](../shared_attributes/values.md)
