Fill Component
The Fill component creates colored or gradient backgrounds for elements. It responds to the parent Element’s interactive state and supports variants.
Basic Usage
<Fill color="dodgerblue" elevation={0} />
Props
colorβ Background color (any valid CSS color)opacityβ Fill opacity (0-1)gradientβ CSS gradient string (overrides color when provided)elevationβ Z-index stacking ordervariantsβ State-specific property overrides
Gradients
<Fill
gradient="linear-gradient(to bottom, #ff0000, #0000ff)"
elevation={0}
/>
Interactive Variants
Fill components can change appearance based on element state:
<Fill
color="blue"
elevation={0}
variants={{
default: { opacity: 1 },
hover: {
color: "lightblue",
opacity: 0.9
},
pressed: {
color: "darkblue"
}
}}
/>