Responsive Values
Change layout-related values by device without creating new files or complex conditional logic.
EXAMPLE USAGE
TypeScriptApp.tsx
import { responsive } from 'rn-responsive';
const ResponsiveGrid = () => {
// Define values for each breakpoint directly
const columns = responsive({
mobile: 1,
tablet: 2,
desktop: 4
});
const spacing = responsive({
mobile: 16,
desktop: 32
});
return (
<Grid
numColumns={columns}
gap={spacing}
>
{/* Items will reflow automatically */}
</Grid>
);
};LIVE PREVIEW
Open in SnackPreview Mode
1
2
3
4