rw.responsiveProps
Accessing Responsive Properties
const transformHook = (rw) => {
const { imageFileSize, columnCount } = rw.responsiveProps;
// Each responsive property is an object with breakpoint keys
console.log(imageFileSize);
// { base: 400, sm: 600, md: 800, lg: 1200 }
console.log(columnCount);
// { base: 1, md: 2, lg: 3 }
};
exports.transformHook = transformHook;Structure
{
base: value, // Default/mobile value
sm: value, // Small screens
md: value, // Medium screens
lg: value, // Large screens
xl: value, // Extra large screens
"2xl": value // 2X large screens
}Example: Responsive Image Sizing
Example: Responsive Hidden States
Combining with Regular Props
Last updated
Was this helpful?

