# RadialGradient

> Represents the SVG <radialGradient> element for defining radial gradients.

[API reference](/docs/api/index.md) › [HTML SVG](/docs/extensions/html-svg/reference/index.md) › RadialGradient

| final class | `UIAwesome\Html\Svg\RadialGradient` |
| --- | --- |
| Extends | [`UIAwesome\Html\Core\Element\BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) » [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| Implements | [`UIAwesome\Html\Contracts\Attribute\AttributesInterface`](/docs/extensions/html-contracts/reference/attribute/attributesinterface/index.md), [`UIAwesome\Html\Contracts\Element\BlockInterface`](/docs/extensions/html-contracts/reference/element/blockinterface/index.md), [`UIAwesome\Html\Contracts\Element\ClearableContentInterface`](/docs/extensions/html-contracts/reference/element/clearablecontentinterface/index.md), [`UIAwesome\Html\Contracts\RenderableInterface`](/docs/extensions/html-contracts/reference/renderableinterface/index.md) |
| Uses traits | [`UIAwesome\Html\Attribute\Global\CanBeAutofocus`](/docs/extensions/html-attribute/reference/global/canbeautofocus/index.md), [`UIAwesome\Html\Attribute\Global\CanBeHidden`](/docs/extensions/html-attribute/reference/global/canbehidden/index.md), [`UIAwesome\Html\Attribute\Global\HasAccesskey`](/docs/extensions/html-attribute/reference/global/hasaccesskey/index.md), [`UIAwesome\Html\Attribute\Global\HasAria`](/docs/extensions/html-attribute/reference/global/hasaria/index.md), [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md), [`UIAwesome\Html\Attribute\Global\HasClass`](/docs/extensions/html-attribute/reference/global/hasclass/index.md), [`UIAwesome\Html\Mixin\HasContent`](/docs/extensions/html-mixin/reference/hascontent/index.md), [`UIAwesome\Html\Attribute\Global\HasContentEditable`](/docs/extensions/html-attribute/reference/global/hascontenteditable/index.md), [`UIAwesome\Html\Attribute\Global\HasData`](/docs/extensions/html-attribute/reference/global/hasdata/index.md), [`UIAwesome\Html\Attribute\Global\HasDir`](/docs/extensions/html-attribute/reference/global/hasdir/index.md), [`UIAwesome\Html\Attribute\Global\HasDraggable`](/docs/extensions/html-attribute/reference/global/hasdraggable/index.md), [`UIAwesome\Html\Attribute\Global\HasEvents`](/docs/extensions/html-attribute/reference/global/hasevents/index.md), [`UIAwesome\Html\Attribute\Global\HasId`](/docs/extensions/html-attribute/reference/global/hasid/index.md), [`UIAwesome\Html\Attribute\Global\HasLang`](/docs/extensions/html-attribute/reference/global/haslang/index.md), [`UIAwesome\Html\Attribute\Global\HasMicroData`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md), [`UIAwesome\Html\Attribute\Global\HasRole`](/docs/extensions/html-attribute/reference/global/hasrole/index.md), [`UIAwesome\Html\Attribute\Global\HasSpellcheck`](/docs/extensions/html-attribute/reference/global/hasspellcheck/index.md), [`UIAwesome\Html\Attribute\Global\HasStyle`](/docs/extensions/html-attribute/reference/global/hasstyle/index.md), [`UIAwesome\Html\Attribute\Global\HasTabindex`](/docs/extensions/html-attribute/reference/global/hastabindex/index.md), [`UIAwesome\Html\Attribute\Global\HasTitle`](/docs/extensions/html-attribute/reference/global/hastitle/index.md), [`UIAwesome\Html\Attribute\Global\HasTranslate`](/docs/extensions/html-attribute/reference/global/hastranslate/index.md), [`UIAwesome\Html\Core\Event\HasAfterRun`](/docs/extensions/html-core/reference/event/hasafterrun/index.md), [`UIAwesome\Html\Core\Event\HasBeforeRun`](/docs/extensions/html-core/reference/event/hasbeforerun/index.md) |
| Source | [`src/RadialGradient.php`](https://github.com/ui-awesome/html-svg/blob/main/src/RadialGradient.php#L44) |

Represents the SVG `<radialGradient>` element for defining radial gradients.

Provides a concrete `<radialGradient>` element implementation that returns [`SvgBlock::RADIAL_GRADIENT`](/docs/extensions/html-svg/reference/tag/svgblock/index.md#case-RADIAL_GRADIENT) and
provides gradient and geometry attribute methods.

The `<radialGradient>` element defines a radial gradient that can be referenced by `fill` and `stroke`.

Usage example:
```php
use UIAwesome\Html\Svg\{RadialGradient, Stop};

echo RadialGradient::tag()
    ->id('spot')
    ->cx('50%')
    ->cy('50%')
    ->r('50%')
    ->content(
        Stop::tag()->offset('0%')->stopColor('#ffffff')->stopOpacity(1),
        Stop::tag()->offset('100%')->stopColor('#000000')->stopOpacity(1),
    )
    ->render();
```

See also: <https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/radialGradient> ([`BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) for the base block-level implementation.).

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-attributes"></span>[`$attributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md#property-attributes) protected | `mixed[]` | HTML attributes array used by the implementing class. Default: `[]`. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="property-content"></span>[`$content`](/docs/extensions/html-mixin/reference/hascontent/index.md#property-content) protected | `string` | Content string assigned to the element. Default: `''`. | [`UIAwesome\Html\Mixin\HasContent`](/docs/extensions/html-mixin/reference/hascontent/index.md) |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-__construct"></span>[`__construct()`](/docs/extensions/html-core/reference/base/basetag/index.md#method-__construct) final | Initializes a new tag instance. | [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| <span id="method-__toString"></span>[`__toString()`](/docs/extensions/html-core/reference/base/basetag/index.md#method-__toString) | Returns the rendered tag string. | [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| <span id="method-accesskey"></span>[`accesskey()`](/docs/extensions/html-attribute/reference/global/hasaccesskey/index.md#method-accesskey) | Sets the `accesskey` attribute. | [`UIAwesome\Html\Attribute\Global\HasAccesskey`](/docs/extensions/html-attribute/reference/global/hasaccesskey/index.md) |
| <span id="method-addAriaAttribute"></span>[`addAriaAttribute()`](/docs/extensions/html-attribute/reference/global/hasaria/index.md#method-addAriaAttribute) | Sets an `aria-*` attribute. | [`UIAwesome\Html\Attribute\Global\HasAria`](/docs/extensions/html-attribute/reference/global/hasaria/index.md) |
| <span id="method-addAttribute"></span>[`addAttribute()`](/docs/extensions/html-mixin/reference/hasattributes/index.md#method-addAttribute) | Adds or updates a single HTML attribute for the element. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="method-addDataAttribute"></span>[`addDataAttribute()`](/docs/extensions/html-attribute/reference/global/hasdata/index.md#method-addDataAttribute) | Sets a `data-*` attribute. | [`UIAwesome\Html\Attribute\Global\HasData`](/docs/extensions/html-attribute/reference/global/hasdata/index.md) |
| <span id="method-addEvent"></span>[`addEvent()`](/docs/extensions/html-attribute/reference/global/hasevents/index.md#method-addEvent) | Sets an `on*` event attribute. | [`UIAwesome\Html\Attribute\Global\HasEvents`](/docs/extensions/html-attribute/reference/global/hasevents/index.md) |
| <span id="method-ariaAttributes"></span>[`ariaAttributes()`](/docs/extensions/html-attribute/reference/global/hasaria/index.md#method-ariaAttributes) | Sets multiple `aria-*` attributes. | [`UIAwesome\Html\Attribute\Global\HasAria`](/docs/extensions/html-attribute/reference/global/hasaria/index.md) |
| <span id="method-attributes"></span>[`attributes()`](/docs/extensions/html-mixin/reference/hasattributes/index.md#method-attributes) | Adds or updates multiple HTML attributes for the element. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="method-autofocus"></span>[`autofocus()`](/docs/extensions/html-attribute/reference/global/canbeautofocus/index.md#method-autofocus) | Sets the `autofocus` attribute. | [`UIAwesome\Html\Attribute\Global\CanBeAutofocus`](/docs/extensions/html-attribute/reference/global/canbeautofocus/index.md) |
| <span id="method-begin"></span>[`begin()`](/docs/extensions/html-core/reference/element/baseblock/index.md#method-begin) final | Starts begin/end rendering for this instance. | [`UIAwesome\Html\Core\Element\BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) |
| <span id="method-class"></span>[`class()`](/docs/extensions/html-attribute/reference/global/hasclass/index.md#method-class) | Sets the `class` attribute. | [`UIAwesome\Html\Attribute\Global\HasClass`](/docs/extensions/html-attribute/reference/global/hasclass/index.md) |
| <span id="method-clearContent"></span>[`clearContent()`](/docs/extensions/html-mixin/reference/hascontent/index.md#method-clearContent) | Clears encoded and raw content without changing other component state. | [`UIAwesome\Html\Mixin\HasContent`](/docs/extensions/html-mixin/reference/hascontent/index.md) |
| <span id="method-config"></span>[`config()`](/docs/extensions/html-core/reference/base/basetag/index.md#method-config) | Applies application-scoped config recipes to this tag. | [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| <span id="method-content"></span>[`content()`](/docs/extensions/html-mixin/reference/hascontent/index.md#method-content) | Appends encoded content. | [`UIAwesome\Html\Mixin\HasContent`](/docs/extensions/html-mixin/reference/hascontent/index.md) |
| <span id="method-contentEditable"></span>[`contentEditable()`](/docs/extensions/html-attribute/reference/global/hascontenteditable/index.md#method-contentEditable) | Sets the `contenteditable` attribute. | [`UIAwesome\Html\Attribute\Global\HasContentEditable`](/docs/extensions/html-attribute/reference/global/hascontenteditable/index.md) |
| [`cx()`](#method-cx) | Sets the SVG `cx` attribute for the element. | `RadialGradient` |
| [`cy()`](#method-cy) | Sets the SVG `cy` attribute for the element. | `RadialGradient` |
| <span id="method-dataAttributes"></span>[`dataAttributes()`](/docs/extensions/html-attribute/reference/global/hasdata/index.md#method-dataAttributes) | Sets multiple `data-*` attributes. | [`UIAwesome\Html\Attribute\Global\HasData`](/docs/extensions/html-attribute/reference/global/hasdata/index.md) |
| <span id="method-dir"></span>[`dir()`](/docs/extensions/html-attribute/reference/global/hasdir/index.md#method-dir) | Sets the `dir` attribute. | [`UIAwesome\Html\Attribute\Global\HasDir`](/docs/extensions/html-attribute/reference/global/hasdir/index.md) |
| <span id="method-draggable"></span>[`draggable()`](/docs/extensions/html-attribute/reference/global/hasdraggable/index.md#method-draggable) | Sets the `draggable` attribute. | [`UIAwesome\Html\Attribute\Global\HasDraggable`](/docs/extensions/html-attribute/reference/global/hasdraggable/index.md) |
| <span id="method-end"></span>[`end()`](/docs/extensions/html-core/reference/element/baseblock/index.md#method-end) static final | Ends the most recent begin/end rendering block for the current class. | [`UIAwesome\Html\Core\Element\BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) |
| <span id="method-events"></span>[`events()`](/docs/extensions/html-attribute/reference/global/hasevents/index.md#method-events) | Sets multiple `on*` event attributes. | [`UIAwesome\Html\Attribute\Global\HasEvents`](/docs/extensions/html-attribute/reference/global/hasevents/index.md) |
| [`fr()`](#method-fr) | Sets the SVG `fr` attribute for the element. | `RadialGradient` |
| [`fx()`](#method-fx) | Sets the SVG `fx` attribute for the element. | `RadialGradient` |
| [`fy()`](#method-fy) | Sets the SVG `fy` attribute for the element. | `RadialGradient` |
| <span id="method-getAttribute"></span>[`getAttribute()`](/docs/extensions/html-mixin/reference/hasattributes/index.md#method-getAttribute) | Returns the value of a single HTML attribute. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="method-getAttributes"></span>[`getAttributes()`](/docs/extensions/html-mixin/reference/hasattributes/index.md#method-getAttributes) | Returns the `array` of HTML attributes for the element. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="method-getContent"></span>[`getContent()`](/docs/extensions/html-mixin/reference/hascontent/index.md#method-getContent) | Returns the content assigned to the element. | [`UIAwesome\Html\Mixin\HasContent`](/docs/extensions/html-mixin/reference/hascontent/index.md) |
| [`gradientTransform()`](#method-gradientTransform) | Sets the SVG `gradientTransform` attribute for the gradient element. | `RadialGradient` |
| [`gradientUnits()`](#method-gradientUnits) | Sets the SVG `gradientUnits` attribute for the gradient element. | `RadialGradient` |
| <span id="method-hidden"></span>[`hidden()`](/docs/extensions/html-attribute/reference/global/canbehidden/index.md#method-hidden) | Sets the `hidden` attribute. | [`UIAwesome\Html\Attribute\Global\CanBeHidden`](/docs/extensions/html-attribute/reference/global/canbehidden/index.md) |
| [`href()`](#method-href) | Sets the `href` attribute. | `RadialGradient` |
| <span id="method-html"></span>[`html()`](/docs/extensions/html-mixin/reference/hascontent/index.md#method-html) | Appends trusted raw HTML content without encoding or sanitizing it. | [`UIAwesome\Html\Mixin\HasContent`](/docs/extensions/html-mixin/reference/hascontent/index.md) |
| <span id="method-id"></span>[`id()`](/docs/extensions/html-attribute/reference/global/hasid/index.md#method-id) | Sets the `id` attribute. | [`UIAwesome\Html\Attribute\Global\HasId`](/docs/extensions/html-attribute/reference/global/hasid/index.md) |
| <span id="method-itemId"></span>[`itemId()`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md#method-itemId) | Sets the `itemid` attribute. | [`UIAwesome\Html\Attribute\Global\HasMicroData`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md) |
| <span id="method-itemProp"></span>[`itemProp()`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md#method-itemProp) | Sets the `itemprop` attribute. | [`UIAwesome\Html\Attribute\Global\HasMicroData`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md) |
| <span id="method-itemRef"></span>[`itemRef()`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md#method-itemRef) | Sets the `itemref` attribute. | [`UIAwesome\Html\Attribute\Global\HasMicroData`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md) |
| <span id="method-itemScope"></span>[`itemScope()`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md#method-itemScope) | Sets the `itemscope` attribute. | [`UIAwesome\Html\Attribute\Global\HasMicroData`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md) |
| <span id="method-itemType"></span>[`itemType()`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md#method-itemType) | Sets the `itemtype` attribute. | [`UIAwesome\Html\Attribute\Global\HasMicroData`](/docs/extensions/html-attribute/reference/global/hasmicrodata/index.md) |
| <span id="method-lang"></span>[`lang()`](/docs/extensions/html-attribute/reference/global/haslang/index.md#method-lang) | Sets the `lang` attribute. | [`UIAwesome\Html\Attribute\Global\HasLang`](/docs/extensions/html-attribute/reference/global/haslang/index.md) |
| [`opacity()`](#method-opacity) | Sets the SVG `opacity` attribute for the element. | `RadialGradient` |
| [`r()`](#method-r) | Sets the SVG `r` attribute for the element. | `RadialGradient` |
| <span id="method-removeAriaAttribute"></span>[`removeAriaAttribute()`](/docs/extensions/html-attribute/reference/global/hasaria/index.md#method-removeAriaAttribute) | Removes an `aria-*` attribute. | [`UIAwesome\Html\Attribute\Global\HasAria`](/docs/extensions/html-attribute/reference/global/hasaria/index.md) |
| <span id="method-removeAttribute"></span>[`removeAttribute()`](/docs/extensions/html-mixin/reference/hasattributes/index.md#method-removeAttribute) | Removes a specific HTML attribute from the element. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="method-removeDataAttribute"></span>[`removeDataAttribute()`](/docs/extensions/html-attribute/reference/global/hasdata/index.md#method-removeDataAttribute) | Removes a `data-*` attribute. | [`UIAwesome\Html\Attribute\Global\HasData`](/docs/extensions/html-attribute/reference/global/hasdata/index.md) |
| <span id="method-removeEvent"></span>[`removeEvent()`](/docs/extensions/html-attribute/reference/global/hasevents/index.md#method-removeEvent) | Removes an `on*` event attribute. | [`UIAwesome\Html\Attribute\Global\HasEvents`](/docs/extensions/html-attribute/reference/global/hasevents/index.md) |
| <span id="method-render"></span>[`render()`](/docs/extensions/html-core/reference/base/basetag/index.md#method-render) final | Renders the tag with lifecycle hooks. | [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| <span id="method-replaceAttributes"></span>[`replaceAttributes()`](/docs/extensions/html-mixin/reference/hasattributes/index.md#method-replaceAttributes) | Replaces all HTML attributes for the element. | [`UIAwesome\Html\Mixin\HasAttributes`](/docs/extensions/html-mixin/reference/hasattributes/index.md) |
| <span id="method-role"></span>[`role()`](/docs/extensions/html-attribute/reference/global/hasrole/index.md#method-role) | Sets the `role` attribute. | [`UIAwesome\Html\Attribute\Global\HasRole`](/docs/extensions/html-attribute/reference/global/hasrole/index.md) |
| <span id="method-spellcheck"></span>[`spellcheck()`](/docs/extensions/html-attribute/reference/global/hasspellcheck/index.md#method-spellcheck) | Sets the `spellcheck` attribute. | [`UIAwesome\Html\Attribute\Global\HasSpellcheck`](/docs/extensions/html-attribute/reference/global/hasspellcheck/index.md) |
| [`spreadMethod()`](#method-spreadMethod) | Sets the SVG `spreadMethod` attribute for the gradient element. | `RadialGradient` |
| <span id="method-style"></span>[`style()`](/docs/extensions/html-attribute/reference/global/hasstyle/index.md#method-style) | Sets the `style` attribute. | [`UIAwesome\Html\Attribute\Global\HasStyle`](/docs/extensions/html-attribute/reference/global/hasstyle/index.md) |
| <span id="method-tabIndex"></span>[`tabIndex()`](/docs/extensions/html-attribute/reference/global/hastabindex/index.md#method-tabIndex) | Sets the `tabindex` attribute. | [`UIAwesome\Html\Attribute\Global\HasTabindex`](/docs/extensions/html-attribute/reference/global/hastabindex/index.md) |
| <span id="method-tag"></span>[`tag()`](/docs/extensions/html-core/reference/base/basetag/index.md#method-tag) static | Creates and configures a new tag instance. | [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| <span id="method-title"></span>[`title()`](/docs/extensions/html-attribute/reference/global/hastitle/index.md#method-title) | Sets the `title` attribute. | [`UIAwesome\Html\Attribute\Global\HasTitle`](/docs/extensions/html-attribute/reference/global/hastitle/index.md) |
| <span id="method-translate"></span>[`translate()`](/docs/extensions/html-attribute/reference/global/hastranslate/index.md#method-translate) | Sets the `translate` attribute. | [`UIAwesome\Html\Attribute\Global\HasTranslate`](/docs/extensions/html-attribute/reference/global/hastranslate/index.md) |
| <span id="method-afterRun"></span>[`afterRun()`](/docs/extensions/html-core/reference/event/hasafterrun/index.md#method-afterRun) protected | Post-processes rendered output. | [`UIAwesome\Html\Core\Event\HasAfterRun`](/docs/extensions/html-core/reference/event/hasafterrun/index.md) |
| <span id="method-beforeRun"></span>[`beforeRun()`](/docs/extensions/html-core/reference/event/hasbeforerun/index.md#method-beforeRun) protected | Validates state before rendering. | [`UIAwesome\Html\Core\Event\HasBeforeRun`](/docs/extensions/html-core/reference/event/hasbeforerun/index.md) |
| [`getTag()`](#method-getTag) protected | Returns the tag enumeration for the `<radialGradient>` element. | `RadialGradient` |
| <span id="method-isBeginExecuted"></span>[`isBeginExecuted()`](/docs/extensions/html-core/reference/element/baseblock/index.md#method-isBeginExecuted) protected | Indicates whether this instance has an open or closing operation in the current context. | [`UIAwesome\Html\Core\Element\BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) |
| <span id="method-loadDefault"></span>[`loadDefault()`](/docs/extensions/html-core/reference/base/basetag/index.md#method-loadDefault) protected | Returns class-level default definitions. | [`UIAwesome\Html\Core\Base\BaseTag`](/docs/extensions/html-core/reference/base/basetag/index.md) |
| <span id="method-run"></span>[`run()`](/docs/extensions/html-core/reference/element/baseblock/index.md#method-run) protected | Renders the block element. | [`UIAwesome\Html\Core\Element\BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) |
| <span id="method-runBegin"></span>[`runBegin()`](/docs/extensions/html-core/reference/element/baseblock/index.md#method-runBegin) protected | Returns the opening tag for begin/end rendering. | [`UIAwesome\Html\Core\Element\BaseBlock`](/docs/extensions/html-core/reference/element/baseblock/index.md) |

## Method details

### cx() <span id="method-cx"></span>

```php
public function cx(float|int|string|null $value): static
```

Sets the SVG `cx` attribute for the element.

Creates a new instance with the specified center x-coordinate value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Center x-coordinate value (for example, '50', '50%', or `null` to unset). |

**Returns**

`static`: New instance with the updated `cx` attribute.

### cy() <span id="method-cy"></span>

```php
public function cy(float|int|string|null $value): static
```

Sets the SVG `cy` attribute for the element.

Creates a new instance with the specified center y-coordinate value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Center y-coordinate value (for example, '50', '50%', or `null` to unset). |

**Returns**

`static`: New instance with the updated `cy` attribute.

### fr() <span id="method-fr"></span>

```php
public function fr(float|int|string|null $value): static
```

Sets the SVG `fr` attribute for the element.

Creates a new instance with the specified start circle radius value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Start circle radius value (for example, '25', '50%', or `null` to unset). |

**Returns**

`static`: New instance with the updated `fr` attribute.

### fx() <span id="method-fx"></span>

```php
public function fx(float|int|string|null $value): static
```

Sets the SVG `fx` attribute for the element.

Creates a new instance with the specified start circle x-coordinate value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Start circle x-coordinate value (for example, '50', '50%', or `null` to unset). |

**Returns**

`static`: New instance with the updated `fx` attribute.

### fy() <span id="method-fy"></span>

```php
public function fy(float|int|string|null $value): static
```

Sets the SVG `fy` attribute for the element.

Creates a new instance with the specified start circle y-coordinate value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Start circle y-coordinate value (for example, '50', '50%', or `null` to unset). |

**Returns**

`static`: New instance with the updated `fy` attribute.

### gradientTransform() <span id="method-gradientTransform"></span>

```php
public function gradientTransform(string|null $value): static
```

Sets the SVG `gradientTransform` attribute for the gradient element.

Creates a new instance with the specified gradient transform value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `string\|null` | Transform value (for example, 'rotate(45)', 'scale(2)', or `null` to unset). |

**Returns**

`static`: New instance with the updated `gradientTransform` attribute.

### gradientUnits() <span id="method-gradientUnits"></span>

```php
public function gradientUnits(UIAwesome\Html\Svg\Values\CoordinateUnits|string|null $value): static
```

Sets the SVG `gradientUnits` attribute for the gradient element.

Creates a new instance with the specified gradient units value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | [`UIAwesome\Html\Svg\Values\CoordinateUnits`](/docs/extensions/html-svg/reference/values/coordinateunits/index.md)`\|string\|null` | Gradient units value (for example, 'userSpaceOnUse', [`CoordinateUnits`](/docs/extensions/html-svg/reference/values/coordinateunits/index.md) enum, or `null` to unset). |

**Returns**

`static`: New instance with the updated `gradientUnits` attribute.

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): If the provided value is not a valid [`CoordinateUnits`](/docs/extensions/html-svg/reference/values/coordinateunits/index.md) enum or string.

### href() <span id="method-href"></span>

```php
public function href(string|Stringable|UnitEnum|null $value): static
```

Sets the `href` attribute.

Usage example:
```php
$element->href('#gradient');
$element->href(null);
```

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `string\|`[`Stringable`](https://www.php.net/manual/en/class.stringable.php)`\|`[`UnitEnum`](https://www.php.net/manual/en/class.unitenum.php)`\|null` | URL, path, or fragment, or `null` to remove the attribute. |

**Returns**

`static`: New instance with the updated `href` attribute.

### opacity() <span id="method-opacity"></span>

```php
public function opacity(float|int|string|null $value): static
```

Sets the SVG `opacity` attribute for the element.

Creates a new instance with the specified opacity value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Opacity value (for example, '0.5' or `null` to unset). |

**Returns**

`static`: New instance with the updated `opacity` attribute.

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): If the value is outside the allowed range ('0'-'1') and not `null`.

### r() <span id="method-r"></span>

```php
public function r(float|int|string|null $value): static
```

Sets the SVG `r` attribute for the element.

Creates a new instance with the specified radius value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `float\|int\|string\|null` | Radius value (for example, '25', '50%', or `null` to unset). |

**Returns**

`static`: New instance with the updated `r` attribute.

### spreadMethod() <span id="method-spreadMethod"></span>

```php
public function spreadMethod(UIAwesome\Html\Svg\Values\SpreadMethod|string|null $value): static
```

Sets the SVG `spreadMethod` attribute for the gradient element.

Creates a new instance with the specified spread method value for the rendered element.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | [`UIAwesome\Html\Svg\Values\SpreadMethod`](/docs/extensions/html-svg/reference/values/spreadmethod/index.md)`\|string\|null` | Spread method value (for example, 'pad', [`SpreadMethod`](/docs/extensions/html-svg/reference/values/spreadmethod/index.md) enum, or `null` to unset). |

**Returns**

`static`: New instance with the updated `spreadMethod` attribute.

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): If the provided value is not a valid [`SpreadMethod`](/docs/extensions/html-svg/reference/values/spreadmethod/index.md) enum or string.

### getTag() <span id="method-getTag"></span>

```php
protected function getTag(): BackedEnum
```

Returns the tag enumeration for the `<radialGradient>` element.

**Returns**

[`BackedEnum`](https://www.php.net/manual/en/class.backedenum.php): Tag enumeration instance for `<radialGradient>`. [`SvgBlock`](/docs/extensions/html-svg/reference/tag/svgblock/index.md) for valid SVG block-level tags.