# [Usage](../../../usage.md) > [Components and standard attributes](../basics.md) > default

---
`default` | `->setDefault()`

It will set a default value for the component state when the `value` itself is not set. Useful in `Repeaters`, `Forms` or `create` routes.

| Types              | Default |
|--------------------|---------|
| `string`, `number` | `null`  |

Provides the fallback state for Form fields (`Input`, `Select`, `Checkbox`, `Repeater` children) when `value` is not set. Useful on create routes and inside Repeaters for new rows. When omitted (`null`) and no `value` exists, the field starts empty.
`value` always wins over `default` when both are present.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Input::make()->setName('country')->setDefault('Italy') !!}
```
Controller:
```php
Input::make()->setName('country')->setDefault('Italy');
```

### Interaction / tips
- Pair `value` (../shared_attributes/value.md) + `default`: `value` for edit, `default` for create.
- For whole-form maps use `values` (../shared_attributes/values.md) and `defaults` (../shared_attributes/defaults.md) keyed by `name`.
- Combine with `placeholder` (../shared_attributes/placeholder.md) for hint text when both are empty.

See also: [value](value.md), [values](values.md), [defaults](defaults.md), [placeholder](placeholder.md), [basics](../basics.md), [Input](../forms/input.md).