width

Class Description

w

Sets width via --w. Scaled by spacing unit. Use [w] for raw values.

CSS Rules

.w {
  width: calc(var(--spacing) * var(--w));
}

Usage

The .w class is flagged as a value-driven selector. The variable --w is required.
<element class="w" style="--w: /* value */;" />

Responsive

Prefix .w utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w" style="--md-w: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w:hover" style="--w-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w::before" style="--w-before: /* value */;" />

<element class="content-after w::after" style="--w-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="w=value" />

<!-- Output -->
<element class="w" style="--w: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.w Sets width via --w. Scaled by spacing unit. Use [w] for raw values.

[w]

Applies raw --w directly to width. Use for custom, unscaled sizing.

CSS Rules

.\[w\] {
  width: var(--w);
}

Usage

The .[w] class is flagged as a value-driven selector. The variable --w is required.
<element class="[w]" style="--w: /* value */;" />

Responsive

Prefix .[w] utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:[w]" style="--md-w: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="[w]:hover" style="--w-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="[w]:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before [w]::before" style="--w-before: /* value */;" />

<element class="content-after [w]::after" style="--w-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="[w]=value" />

<!-- Output -->
<element class="[w]" style="--w: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.[w] Applies raw --w directly to width. Use for custom, unscaled sizing.

w-3xs

Sets width to the 3xs container size scale token.

CSS Rules

.w-3xs {
  width: var(--container-3xs);
}

Usage

<element class="w-3xs" />

Responsive

Prefix .w-3xs utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-3xs" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-3xs:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-3xs:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-3xs::before" />

<element class="content-after w-3xs::after" />
.w-3xs Sets width to the 3xs container size scale token.

w-2xs

Sets width to the 2xs container size scale token.

CSS Rules

.w-2xs {
  width: var(--container-2xs);
}

Usage

<element class="w-2xs" />

Responsive

Prefix .w-2xs utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-2xs" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-2xs:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-2xs:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-2xs::before" />

<element class="content-after w-2xs::after" />
.w-2xs Sets width to the 2xs container size scale token.

w-xs

Sets width to the xs container size scale token.

CSS Rules

.w-xs {
  width: var(--container-xs);
}

Usage

<element class="w-xs" />

Responsive

Prefix .w-xs utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-xs" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-xs:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-xs:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-xs::before" />

<element class="content-after w-xs::after" />
.w-xs Sets width to the xs container size scale token.

w-sm

Sets width to the sm container size scale token.

CSS Rules

.w-sm {
  width: var(--container-sm);
}

Usage

<element class="w-sm" />

Responsive

Prefix .w-sm utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-sm" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-sm:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-sm:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-sm::before" />

<element class="content-after w-sm::after" />
.w-sm Sets width to the sm container size scale token.

w-md

Sets width to the md container size scale token.

CSS Rules

.w-md {
  width: var(--container-md);
}

Usage

<element class="w-md" />

Responsive

Prefix .w-md utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-md" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-md:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-md:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-md::before" />

<element class="content-after w-md::after" />
.w-md Sets width to the md container size scale token.

w-lg

Sets width to the lg container size scale token.

CSS Rules

.w-lg {
  width: var(--container-lg);
}

Usage

<element class="w-lg" />

Responsive

Prefix .w-lg utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-lg" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-lg:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-lg:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-lg::before" />

<element class="content-after w-lg::after" />
.w-lg Sets width to the lg container size scale token.

w-xl

Sets width to the xl container size scale token.

CSS Rules

.w-xl {
  width: var(--container-xl);
}

Usage

<element class="w-xl" />

Responsive

Prefix .w-xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-xl::before" />

<element class="content-after w-xl::after" />
.w-xl Sets width to the xl container size scale token.

w-2xl

Sets width to the 2xl container size scale token.

CSS Rules

.w-2xl {
  width: var(--container-2xl);
}

Usage

<element class="w-2xl" />

Responsive

Prefix .w-2xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-2xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-2xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-2xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-2xl::before" />

<element class="content-after w-2xl::after" />
.w-2xl Sets width to the 2xl container size scale token.

w-3xl

Sets width to the 3xl container size scale token.

CSS Rules

.w-3xl {
  width: var(--container-3xl);
}

Usage

<element class="w-3xl" />

Responsive

Prefix .w-3xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-3xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-3xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-3xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-3xl::before" />

<element class="content-after w-3xl::after" />
.w-3xl Sets width to the 3xl container size scale token.

w-4xl

Sets width to the 4xl container size scale token.

CSS Rules

.w-4xl {
  width: var(--container-4xl);
}

Usage

<element class="w-4xl" />

Responsive

Prefix .w-4xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-4xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-4xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-4xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-4xl::before" />

<element class="content-after w-4xl::after" />
.w-4xl Sets width to the 4xl container size scale token.

w-5xl

Sets width to the 5xl container size scale token.

CSS Rules

.w-5xl {
  width: var(--container-5xl);
}

Usage

<element class="w-5xl" />

Responsive

Prefix .w-5xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-5xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-5xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-5xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-5xl::before" />

<element class="content-after w-5xl::after" />
.w-5xl Sets width to the 5xl container size scale token.

w-6xl

Sets width to the 6xl container size scale token.

CSS Rules

.w-6xl {
  width: var(--container-6xl);
}

Usage

<element class="w-6xl" />

Responsive

Prefix .w-6xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-6xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-6xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-6xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-6xl::before" />

<element class="content-after w-6xl::after" />
.w-6xl Sets width to the 6xl container size scale token.

w-7xl

Sets width to the 7xl container size scale token.

CSS Rules

.w-7xl {
  width: var(--container-7xl);
}

Usage

<element class="w-7xl" />

Responsive

Prefix .w-7xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-7xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-7xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-7xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-7xl::before" />

<element class="content-after w-7xl::after" />
.w-7xl Sets width to the 7xl container size scale token.

w-auto

Sets width: auto.

CSS Rules

.w-auto {
  width: auto;
}

Usage

<element class="w-auto" />

Responsive

Prefix .w-auto utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-auto" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-auto:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-auto:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-auto::before" />

<element class="content-after w-auto::after" />
.w-auto Sets width: auto.

w-full

Sets width: 100%.

CSS Rules

.w-full {
  width: 100%;
}

Usage

<element class="w-full" />

Responsive

Prefix .w-full utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-full" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-full:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-full:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-full::before" />

<element class="content-after w-full::after" />
.w-full Sets width: 100%.

w-screen

Sets width: 100vw.

CSS Rules

.w-screen {
  width: 100vw;
}

Usage

<element class="w-screen" />

Responsive

Prefix .w-screen utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-screen" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-screen:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-screen:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-screen::before" />

<element class="content-after w-screen::after" />
.w-screen Sets width: 100vw.

w-dvw

Sets width to 100% of the dynamic viewport width (100dvw).

CSS Rules

.w-dvw {
  width: 100dvw;
}

Usage

<element class="w-dvw" />

Responsive

Prefix .w-dvw utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-dvw" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-dvw:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-dvw:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-dvw::before" />

<element class="content-after w-dvw::after" />
.w-dvw Sets width to 100% of the dynamic viewport width (100dvw).

w-dvh

Sets width to 100% of the dynamic viewport height (100dvh).

CSS Rules

.w-dvh {
  width: 100dvh;
}

Usage

<element class="w-dvh" />

Responsive

Prefix .w-dvh utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-dvh" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-dvh:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-dvh:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-dvh::before" />

<element class="content-after w-dvh::after" />
.w-dvh Sets width to 100% of the dynamic viewport height (100dvh).

w-lvw

Sets width to 100% of the large viewport width (100lvw).

CSS Rules

.w-lvw {
  width: 100lvw;
}

Usage

<element class="w-lvw" />

Responsive

Prefix .w-lvw utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-lvw" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-lvw:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-lvw:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-lvw::before" />

<element class="content-after w-lvw::after" />
.w-lvw Sets width to 100% of the large viewport width (100lvw).

w-lvh

Sets width to 100% of the large viewport height (100lvh).

CSS Rules

.w-lvh {
  width: 100lvh;
}

Usage

<element class="w-lvh" />

Responsive

Prefix .w-lvh utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-lvh" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-lvh:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-lvh:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-lvh::before" />

<element class="content-after w-lvh::after" />
.w-lvh Sets width to 100% of the large viewport height (100lvh).

w-svw

Sets width to 100% of the small viewport width (100svw).

CSS Rules

.w-svw {
  width: 100svw;
}

Usage

<element class="w-svw" />

Responsive

Prefix .w-svw utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-svw" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-svw:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-svw:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-svw::before" />

<element class="content-after w-svw::after" />
.w-svw Sets width to 100% of the small viewport width (100svw).

w-svh

Sets width to 100% of the small viewport height (100svh).

CSS Rules

.w-svh {
  width: 100svh;
}

Usage

<element class="w-svh" />

Responsive

Prefix .w-svh utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-svh" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-svh:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-svh:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-svh::before" />

<element class="content-after w-svh::after" />
.w-svh Sets width to 100% of the small viewport height (100svh).

w-min

Sets width: min-content.

CSS Rules

.w-min {
  width: min-content;
}

Usage

<element class="w-min" />

Responsive

Prefix .w-min utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-min" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-min:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-min:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-min::before" />

<element class="content-after w-min::after" />
.w-min Sets width: min-content.

w-max

Sets width: max-content.

CSS Rules

.w-max {
  width: max-content;
}

Usage

<element class="w-max" />

Responsive

Prefix .w-max utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-max" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-max:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-max:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-max::before" />

<element class="content-after w-max::after" />
.w-max Sets width: max-content.

w-fit

Sets width: fit-content.

CSS Rules

.w-fit {
  width: fit-content;
}

Usage

<element class="w-fit" />

Responsive

Prefix .w-fit utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:w-fit" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="w-fit:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="w-fit:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before w-fit::before" />

<element class="content-after w-fit::after" />
.w-fit Sets width: fit-content.