Product Image Configuration
Customizing Product Image Aspect Ratio
Example: Autocomplete Product Image
/* src/components/Autocomplete/Item/Product.module.css */
.image {
height: auto;
aspect-ratio: var(--ns-aspect-ratio);
object-fit: contain;
width: 100%;
}/* src/variable.css */
:root {
/* ... other variables ... */
--ns-aspect-ratio: 1; /* Default to square */
}Last updated
Was this helpful?