# Sizing Utilities for controlling the width and height of elements using percentages, pixels, or logical sizing. **Category:** Utilities **Storybook:** https://doc.ux4g.gov.in/web/?path=/story/ux4g-utilities-sizing--introduction ## Variants documented in Storybook - SizingShowcase: https://doc.ux4g.gov.in/web/?path=/story/ux4g-utilities-sizing--sizingshowcase ## Framework setup ### HTML / CDN ```html ``` ### React ```bash npm install ux4g-web-components ``` ```jsx import 'ux4g-web-components/styles.css'; import 'ux4g-web-components/design-system'; ``` ### Angular Update `angular.json`: ```json { "styles": [ "node_modules/ux4g-web-components/styles/ux4g.css", "src/styles.css" ], "scripts": [ "node_modules/ux4g-web-components/dist/runtime/design-system.js" ] } ``` ## Code examples The snippets below are extracted from the Storybook canvas for Sizing. Each example shows the rendered HTML, the equivalent React JSX, and the Angular template markup. ### 1. Introduction — Introduction HTML: ```html
A complete reference for controlling widths, heights, and logical sizing dimensions.
Every class from the utility library, categorized for easy access.
Format: ux4g-w-{size}
|
width-0 (0)
ux4g-w-0
|
|
width-25 (25%)
ux4g-w-25
|
|
width-50 (50%)
ux4g-w-50
|
|
width-75 (75%)
ux4g-w-75
|
|
width-100 (100%)
ux4g-w-100
|
|
width-auto (auto)
ux4g-w-auto
|
Format: ux4g-w-{size}
|
width-px-100 (100px)
ux4g-wpx-100
|
|
width-px-150 (150px)
ux4g-wpx-150
|
|
width-px-200 (200px)
ux4g-wpx-200
|
|
width-px-300 (300px)
ux4g-wpx-300
|
|
width-px-400 (400px)
ux4g-wpx-400
|
Format: ux4g-w-{size}
|
width-min (min-content)
ux4g-w-min
|
|
width-max (max-content)
ux4g-w-max
|
|
width-fit (fit-content)
ux4g-w-fit
|
|
width-screen (100vw)
ux4g-w-screen
|
|
max-width-none (none)
ux4g-max-w-none
|
|
max-width-full (100%)
ux4g-max-w-full
|
|
max-width-fit (fit-content)
ux4g-max-w-fit
|
|
min-width-0 (0)
ux4g-min-w-0
|
|
min-width-full (100%)
ux4g-min-w-full
|
Format: ux4g-h-{size}
|
height-0 (0)
ux4g-h-0
|
|
height-25 (25%)
ux4g-h-25
|
|
height-50 (50%)
ux4g-h-50
|
|
height-75 (75%)
ux4g-h-75
|
|
height-100 (100%)
ux4g-h-100
|
|
height-auto (auto)
ux4g-h-auto
|
Format: ux4g-h-{size}
|
height-px-100 (100px)
ux4g-hpx-100
|
|
height-px-150 (150px)
ux4g-hpx-150
|
|
height-px-200 (200px)
ux4g-hpx-200
|
|
height-px-300 (300px)
ux4g-hpx-300
|
|
height-px-400 (400px)
ux4g-hpx-400
|
Format: ux4g-h-{size}
|
height-min (min-content)
ux4g-h-min
|
|
height-max (max-content)
ux4g-h-max
|
|
height-fit (fit-content)
ux4g-h-fit
|
|
height-screen (100vh)
ux4g-h-screen
|
|
height-dvh (100dvh)
ux4g-h-dvh
|
|
max-height-full (100%)
ux4g-max-h-full
|
|
max-height-screen (100vh)
ux4g-max-h-screen
|
|
min-height-0 (0)
ux4g-min-h-0
|
|
min-height-full (100%)
ux4g-min-h-full
|
|
min-height-screen (100vh)
ux4g-min-h-screen
|
|
min-height-dvh (100dvh)
ux4g-min-h-dvh
|
Format: ux4g-{w/h}-{size}
|
inline-size-auto (auto)
ux4g-is-auto
|
|
inline-size-full (100%)
ux4g-is-full
|
|
inline-size-fit (fit-content)
ux4g-is-fit
|
|
inline-size-screen (100vi)
ux4g-is-screen
|
|
min-inline-size-0 (0)
ux4g-min-is-0
|
|
min-inline-size-full (100%)
ux4g-min-is-full
|
|
max-inline-size-full (100%)
ux4g-max-is-full
|
Format: ux4g-{w/h}-{size}
|
block-size-auto (auto)
ux4g-bs-auto
|
|
block-size-full (100%)
ux4g-bs-full
|
|
block-size-fit (fit-content)
ux4g-bs-fit
|
|
block-size-screen (100vb)
ux4g-bs-screen
|
|
min-block-size-0 (0)
ux4g-min-bs-0
|
|
min-block-size-full (100%)
ux4g-min-bs-full
|
|
min-block-size-screen (100vb)
ux4g-min-bs-screen
|
|
max-block-size-full (100%)
ux4g-max-bs-full
|
A complete reference for controlling widths, heights, and logical sizing dimensions.
Every class from the utility library, categorized for easy access.
Format:
ux4g-w-{size}
|
width-0
(0)
ux4g-w-0
|
|
width-25
(25%)
ux4g-w-25
|
|
width-50
(50%)
ux4g-w-50
|
|
width-75
(75%)
ux4g-w-75
|
|
width-100
(100%)
ux4g-w-100
|
|
width-auto
(auto)
ux4g-w-auto
|
Format:
ux4g-w-{size}
|
width-px-100
(100px)
ux4g-wpx-100
|
|
width-px-150
(150px)
ux4g-wpx-150
|
|
width-px-200
(200px)
ux4g-wpx-200
|
|
width-px-300
(300px)
ux4g-wpx-300
|
|
width-px-400
(400px)
ux4g-wpx-400
|
Format:
ux4g-w-{size}
|
width-min
(min-content)
ux4g-w-min
|
|
width-max
(max-content)
ux4g-w-max
|
|
width-fit
(fit-content)
ux4g-w-fit
|
|
width-screen
(100vw)
ux4g-w-screen
|
|
max-width-none
(none)
ux4g-max-w-none
|
|
max-width-full
(100%)
ux4g-max-w-full
|
|
max-width-fit
(fit-content)
ux4g-max-w-fit
|
|
min-width-0
(0)
ux4g-min-w-0
|
|
min-width-full
(100%)
ux4g-min-w-full
|
Format:
ux4g-h-{size}
|
height-0
(0)
ux4g-h-0
|
|
height-25
(25%)
ux4g-h-25
|
|
height-50
(50%)
ux4g-h-50
|
|
height-75
(75%)
ux4g-h-75
|
|
height-100
(100%)
ux4g-h-100
|
|
height-auto
(auto)
ux4g-h-auto
|
Format:
ux4g-h-{size}
|
height-px-100
(100px)
ux4g-hpx-100
|
|
height-px-150
(150px)
ux4g-hpx-150
|
|
height-px-200
(200px)
ux4g-hpx-200
|
|
height-px-300
(300px)
ux4g-hpx-300
|
|
height-px-400
(400px)
ux4g-hpx-400
|
Format:
ux4g-h-{size}
|
height-min
(min-content)
ux4g-h-min
|
|
height-max
(max-content)
ux4g-h-max
|
|
height-fit
(fit-content)
ux4g-h-fit
|
|
height-screen
(100vh)
ux4g-h-screen
|
|
height-dvh
(100dvh)
ux4g-h-dvh
|
|
max-height-full
(100%)
ux4g-max-h-full
|
|
max-height-screen
(100vh)
ux4g-max-h-screen
|
|
min-height-0
(0)
ux4g-min-h-0
|
|
min-height-full
(100%)
ux4g-min-h-full
|
|
min-height-screen
(100vh)
ux4g-min-h-screen
|
|
min-height-dvh
(100dvh)
ux4g-min-h-dvh
|
Format:
ux4g-{w/h}-{size}
|
inline-size-auto
(auto)
ux4g-is-auto
|
|
inline-size-full
(100%)
ux4g-is-full
|
|
inline-size-fit
(fit-content)
ux4g-is-fit
|
|
inline-size-screen
(100vi)
ux4g-is-screen
|
|
min-inline-size-0
(0)
ux4g-min-is-0
|
|
min-inline-size-full
(100%)
ux4g-min-is-full
|
|
max-inline-size-full
(100%)
ux4g-max-is-full
|
Format:
ux4g-{w/h}-{size}
|
block-size-auto
(auto)
ux4g-bs-auto
|
|
block-size-full
(100%)
ux4g-bs-full
|
|
block-size-fit
(fit-content)
ux4g-bs-fit
|
|
block-size-screen
(100vb)
ux4g-bs-screen
|
|
min-block-size-0
(0)
ux4g-min-bs-0
|
|
min-block-size-full
(100%)
ux4g-min-bs-full
|
|
min-block-size-screen
(100vb)
ux4g-min-bs-screen
|
|
max-block-size-full
(100%)
ux4g-max-bs-full
|
A complete reference for controlling widths, heights, and logical sizing dimensions.
Every class from the utility library, categorized for easy access.
Format: ux4g-w-{size}
|
width-0 (0)
ux4g-w-0
|
|
width-25 (25%)
ux4g-w-25
|
|
width-50 (50%)
ux4g-w-50
|
|
width-75 (75%)
ux4g-w-75
|
|
width-100 (100%)
ux4g-w-100
|
|
width-auto (auto)
ux4g-w-auto
|
Format: ux4g-w-{size}
|
width-px-100 (100px)
ux4g-wpx-100
|
|
width-px-150 (150px)
ux4g-wpx-150
|
|
width-px-200 (200px)
ux4g-wpx-200
|
|
width-px-300 (300px)
ux4g-wpx-300
|
|
width-px-400 (400px)
ux4g-wpx-400
|
Format: ux4g-w-{size}
|
width-min (min-content)
ux4g-w-min
|
|
width-max (max-content)
ux4g-w-max
|
|
width-fit (fit-content)
ux4g-w-fit
|
|
width-screen (100vw)
ux4g-w-screen
|
|
max-width-none (none)
ux4g-max-w-none
|
|
max-width-full (100%)
ux4g-max-w-full
|
|
max-width-fit (fit-content)
ux4g-max-w-fit
|
|
min-width-0 (0)
ux4g-min-w-0
|
|
min-width-full (100%)
ux4g-min-w-full
|
Format: ux4g-h-{size}
|
height-0 (0)
ux4g-h-0
|
|
height-25 (25%)
ux4g-h-25
|
|
height-50 (50%)
ux4g-h-50
|
|
height-75 (75%)
ux4g-h-75
|
|
height-100 (100%)
ux4g-h-100
|
|
height-auto (auto)
ux4g-h-auto
|
Format: ux4g-h-{size}
|
height-px-100 (100px)
ux4g-hpx-100
|
|
height-px-150 (150px)
ux4g-hpx-150
|
|
height-px-200 (200px)
ux4g-hpx-200
|
|
height-px-300 (300px)
ux4g-hpx-300
|
|
height-px-400 (400px)
ux4g-hpx-400
|
Format: ux4g-h-{size}
|
height-min (min-content)
ux4g-h-min
|
|
height-max (max-content)
ux4g-h-max
|
|
height-fit (fit-content)
ux4g-h-fit
|
|
height-screen (100vh)
ux4g-h-screen
|
|
height-dvh (100dvh)
ux4g-h-dvh
|
|
max-height-full (100%)
ux4g-max-h-full
|
|
max-height-screen (100vh)
ux4g-max-h-screen
|
|
min-height-0 (0)
ux4g-min-h-0
|
|
min-height-full (100%)
ux4g-min-h-full
|
|
min-height-screen (100vh)
ux4g-min-h-screen
|
|
min-height-dvh (100dvh)
ux4g-min-h-dvh
|
Format: ux4g-{w/h}-{size}
|
inline-size-auto (auto)
ux4g-is-auto
|
|
inline-size-full (100%)
ux4g-is-full
|
|
inline-size-fit (fit-content)
ux4g-is-fit
|
|
inline-size-screen (100vi)
ux4g-is-screen
|
|
min-inline-size-0 (0)
ux4g-min-is-0
|
|
min-inline-size-full (100%)
ux4g-min-is-full
|
|
max-inline-size-full (100%)
ux4g-max-is-full
|
Format: ux4g-{w/h}-{size}
|
block-size-auto (auto)
ux4g-bs-auto
|
|
block-size-full (100%)
ux4g-bs-full
|
|
block-size-fit (fit-content)
ux4g-bs-fit
|
|
block-size-screen (100vb)
ux4g-bs-screen
|
|
min-block-size-0 (0)
ux4g-min-bs-0
|
|
min-block-size-full (100%)
ux4g-min-bs-full
|
|
min-block-size-screen (100vb)
ux4g-min-bs-screen
|
|
max-block-size-full (100%)
ux4g-max-bs-full
|