ComponentShadow
in package
implements
JsonSerializable
FinalYes
Shadow effect for components.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $color : string|null
- The shadow color.
- $offsetX : int|null
- The horizontal offset.
- $offsetY : int|null
- The vertical offset.
- $opacity : float|null
- The shadow opacity (0.0 to 1.0).
- $radius : int|null
- The blur radius.
Methods
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- medium() : self
- Create a medium shadow.
- setColor() : $this
- Set the shadow color.
- setOffset() : $this
- Set the offset.
- setOpacity() : $this
- Set the opacity.
- setRadius() : $this
- Set the blur radius.
- strong() : self
- Create a strong shadow.
- subtle() : self
- Create a subtle shadow.
Properties
$color
The shadow color.
private
string|null
$color
= null
$offsetX
The horizontal offset.
private
int|null
$offsetX
= null
$offsetY
The vertical offset.
private
int|null
$offsetY
= null
$opacity
The shadow opacity (0.0 to 1.0).
private
float|null
$opacity
= null
$radius
The blur radius.
private
int|null
$radius
= null
Methods
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>medium()
Create a medium shadow.
public
static medium() : self
Return values
self —A new instance.
setColor()
Set the shadow color.
public
setColor(string $color) : $this
Parameters
- $color : string
-
The color in hex format.
Return values
$thissetOffset()
Set the offset.
public
setOffset(int $x, int $y) : $this
Parameters
- $x : int
-
The horizontal offset in points.
- $y : int
-
The vertical offset in points.
Return values
$thissetOpacity()
Set the opacity.
public
setOpacity(float $opacity) : $this
Parameters
- $opacity : float
-
Opacity from 0.0 to 1.0.
Return values
$thissetRadius()
Set the blur radius.
public
setRadius(int $radius) : $this
Parameters
- $radius : int
-
The radius in points.
Return values
$thisstrong()
Create a strong shadow.
public
static strong() : self
Return values
self —A new instance.
subtle()
Create a subtle shadow.
public
static subtle() : self
Return values
self —A new instance.