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

---
These are two methods to set and get a custom property of the component, can be used in closure later on or can be used to memorize variables, other components or other classes in an array inside the component instance. 

Can also store complex objects, but be careful: using these methods can slow down the application because of the serialization.

- `->setCustomProperty($propertyName, $propertyValue)`: to set the propery inside the custom properties array.
- `->getCustomProperty($propertyName)`: to retrieve the stored value using the propertyName as key.

`$propertyName`:

| Types    | Default |
|----------|---------|
| `string` | `null`  |

`$propertyValue`:

| Types   | Default |
|---------|---------|
| `mixed` | `null`  |

Custom properties are a per-instance key-value bag available on every component (Form fields, Visuals, containers). They never render; they memoize variables, records (`kfw_form_record`), or Closures for later callbacks. When omitted the bag is empty.
Avoid storing huge graphs: values are serialized for cached actions / schemas.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Input::make()->setName('city')->setCustomProperty('prefix', 'IT-') !!}
```
Controller:
```php
Input::make('city')->setCustomProperty('prefix', 'IT-')->setValue(fn($component) => $component->getCustomProperty('prefix') . 'Rome');
```

### Interaction / tips
- Read inside any attribute Closure (`label`, `value`, `hidden`) via `$component->getCustomProperty()`; see `setAttribute` (../shared_attributes/set_attribute.md).
- Prefer real attributes (`value` (../shared_attributes/value.md), `default` (../shared_attributes/default.md)) for field data; use custom properties for meta.
- `uuid` (../shared_attributes/uuid.md) stays the identity key; custom properties are payload.

See also: [setAttribute](set_attribute.md), [value](value.md), [default](default.md), [uuid](uuid.md), [basics](../basics.md), [Form](../forms/form.md).