Utility classes for controlling width, height, spacing, and layout dimensions

Width Utilities

Fixed and responsive width classes using rem-based scale

ClassWidthUse Case
.wr-1 1rem Tiny elements
.wr-2 2rem Small icons
.wr-3 3rem Buttons
.wr-4 4rem Small inputs
.wr-5 5rem Compact fields
.wr-6 6rem Labels
.wr-8 8rem Short inputs
.wr-10 10rem Medium inputs
.wr-12 12rem Standard inputs
.wr-14 14rem Wide inputs
.wr-16 16rem Sidebars
.wr-20 20rem Panels
.wr-24 24rem Cards
.wr-32 32rem Modals
.wr-40 40rem Content areas
.wr-48 48rem Wide content

Max-Width Utilities

Constrain maximum width with truncation support

ClassMax WidthDemo
.maxwr-5 5rem This text will be truncated when it exceeds the max width
.maxwr-8 8rem This text will be truncated when it exceeds the max width
.maxwr-10 10rem This text will be truncated when it exceeds the max width
.maxwr-15 15rem This text will be truncated when it exceeds the max width
.maxwr-20 20rem This text will be truncated when it exceeds the max width
.maxwr-25 25rem This text will be truncated when it exceeds the max width
.maxwr-30 30rem This text will be truncated when it exceeds the max width

Spacing Utilities

Margin and padding classes based on spacing scale

Spacing Scale

NameValue
xs 0.4rem (4px)
sm 0.8rem (8px)
base 1.6rem (16px)
md 1.6rem (16px)
lg 2.4rem (24px)
xl 3.2rem (32px)
2xl 4.8rem (48px)

Class Pattern

  • m-{size} - Margin all sides
  • mt-{size} - Margin top
  • mb-{size} - Margin bottom
  • ml-{size} - Margin left
  • mr-{size} - Margin right
  • mx-{size} - Margin horizontal
  • my-{size} - Margin vertical
  • p-{size} - Padding all sides
  • pt-{size}, pb-{size}, etc.
  • m-0 - Reset margin
  • p-0 - Reset padding

Gap Utilities

Control spacing between flex/grid children

ClassGap Size
.gap-xs 0.4rem
.gap-sm 0.8rem
.gap-base 1.6rem
.gap-lg 2.4rem
.gap-xl 3.2rem

Display Utilities

Common display and flex utilities

Display

  • d-none - Hidden
  • d-block - Block
  • d-inline - Inline
  • d-inline-block - Inline block
  • d-flex - Flex container
  • d-inline-flex - Inline flex
  • d-grid - Grid container

Flex

  • flex-row / flex-column
  • flex-wrap / flex-nowrap
  • justify-content-start / center / end / between
  • align-items-start / center / end
  • align-self-start / center / end
  • flex-grow-1 / flex-shrink-0

Text Utilities

Typography and text alignment helpers

Alignment

  • text-start - Start-aligned (RTL-aware)
  • text-center - Centered
  • text-end - End-aligned (RTL-aware)

Wrapping

  • text-truncate - Ellipsis overflow
  • text-nowrap - No wrapping
  • text-break - Break long words

Font Size

  • font-xs - 1rem
  • font-sm - 1.2rem
  • font-base - 1.4rem
  • font-lg - 1.8rem
  • font-xl - 2.4rem
  • font-2xl - 3.2rem

Font Weight

  • font-light - 300
  • font-normal - 400
  • font-medium - 500
  • font-semibold - 600
  • font-bold - 700

John Doe

Administrator

Settings

Sidebar
Display
Profile Panel
Body text size. All elements scale proportionally.