Positioned Fill
PositionedFill is a shorthand component that fills the entire Stack. It is equivalent to: Positioned(top: 0, bottom: 0, left: 0, right: 0)

Tsx

import { Stack, PositionedFill } from '@dynshift/layr';

Tsx

Preview

NOTE: Previews are not depiction of actual website output.
1. Use Cases
1a. Full Overlay
Dark overlay on images.

Tsx

Preview

NOTE: Previews are not depiction of actual website output.
1b. Blur Backdrop
Full blur effect behind focused content.

Tsx

Preview

NOTE: Previews are not depiction of actual website output.
2. API Reference
2a. PositionedFillProps
PropTypeDefaultDescription
childrenReactNodeChild widget to fill the stack
classNamestring''Additional CSS classes
styleCSSProperties{}Custom inline styles
Note: PositionedFill automatically sets top = 0, bottom = 0, left = 0, right = 0.
3. TypeScript
Both components are fully typed.

Tsx

import { Positioned, PositionedFill, type PositionedProps } from '@dynshift/layr';
const CustomOverlay: React.FC<{ opacity: number }> = ({ opacity }) => {
return (
<Stack style={{ width: 400, height: 300 }}>
<img src="/bg.jpg" alt="Background" />
<PositionedFill>
<div style={{ backgroundColor: `rgba(0, 0, 0, ${opacity})` }} />
</PositionedFill>
</Stack>
);
};