Sets background-image via --bg-image. Accepts url() or a gradient string.
CSS Rules
.bg-image { background-image: var(--bg-image);}
Usage
The .bg-image
class is flagged as a value-driven selector.
The variable --bg-image is required.
<element class="bg-image" style="--bg-image: /* value */;" />
Responsive
Prefix
.bg-image
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:bg-image" style="--md-bg-image: /* 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
.
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 bg-image::before" style="--bg-image-before: /* value */;" /><element class="content-after bg-image::after" style="--bg-image-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.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.bg-image
Sets background-image via --bg-image. Accepts url() or a gradient string.
bg-image-none
Removes the background image.
CSS Rules
.bg-image-none { background-image: none;}
Usage
<element class="bg-image-none" />
Responsive
Prefix
.bg-image-none
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:bg-image-none" />
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
.
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.
Creates a radial gradient background using configured gradient stops.
CSS Rules
.radial { --tw-gradient-position: var(--radial, in oklab); background-image: var(--radial, in oklab);}
Usage
The .radial
class is flagged as a value-driven selector.
The variable --radial is required.
<element class="radial" style="--radial: /* value */;" />
Responsive
Prefix
.radial
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:radial" style="--md-radial: /* 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
.
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 radial::before" style="--radial-before: /* value */;" /><element class="content-after radial::after" style="--radial-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.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.radial
Creates a radial gradient background using configured gradient stops.
conic
Creates a conic gradient background using configured gradient stops.
CSS Rules
.conic { --tw-gradient-position: var(--conic, in oklab); background-image: var(--conic, in oklab);}
Usage
The .conic
class is flagged as a value-driven selector.
The variable --conic is required.
<element class="conic" style="--conic: /* value */;" />
Responsive
Prefix
.conic
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:conic" style="--md-conic: /* 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
.
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 conic::before" style="--conic-before: /* value */;" /><element class="content-after conic::after" style="--conic-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.
The .from
class is flagged as a value-driven selector.
The variable --from is required.
<element class="from" style="--from: /* value */;" />
Responsive & Dark Mode
Prefix
.from
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
If dark mode is applied, the dark: prefix always
comes first.
<element class="md:from" style="--md-from: /* value */;" /><element class="dark:sm:from" style="--dark-sm-from: /* 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
and dark mode.
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 from::before" style="--from-before: /* value */;" /><element class="content-after from::after" style="--from-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.
The .from/o
class is flagged as a value-driven selector.
The variables --from and --from-o are required.
<element class="from/o" style=" --from: /* value */; --from-o: /* value */; "></element>
Responsive & Dark Mode
Prefix
.from/o
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
If dark mode is applied, the dark: prefix always
comes first.
<element class="md:from/o" style=" --md-from: /* value */; --md-from-o: /* value */; "></element><element class="dark:sm:from/o" style=" --dark-sm-from: /* value */; --dark-sm-from-o: /* value */; "></element>
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
and dark mode.
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 from/o::before" style=" --from-before: /* value */; --from-o-before: /* value */; "></element><element class="content-after from/o::after" style=" --from-after: /* value */; --from-o-after: /* value */; "></element>
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.
The .from-position
class is flagged as a value-driven selector.
The variable --from-position is required.
<element class="from-position" style="--from-position: /* value */;" />
Responsive
Prefix
.from-position
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:from-position" style="--md-from-position: /* 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
.
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 from-position::before" style="--from-position-before: /* value */;" /><element class="content-after from-position::after" style="--from-position-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.
The .via
class is flagged as a value-driven selector.
The variables --via and --via-o are required.
<element class="via" style=" --via: /* value */; --via-o: /* value */; "></element>
Responsive & Dark Mode
Prefix
.via
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
If dark mode is applied, the dark: prefix always
comes first.
<element class="md:via" style=" --md-via: /* value */; --md-via-o: /* value */; "></element><element class="dark:sm:via" style=" --dark-sm-via: /* value */; --dark-sm-via-o: /* value */; "></element>
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
and dark mode.
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 via::before" style=" --via-before: /* value */; --via-o-before: /* value */; "></element><element class="content-after via::after" style=" --via-after: /* value */; --via-o-after: /* value */; "></element>
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.
The .via/o
class is flagged as a value-driven selector.
The variables --via and --via-o are required.
<element class="via/o" style=" --via: /* value */; --via-o: /* value */; "></element>
Responsive & Dark Mode
Prefix
.via/o
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
If dark mode is applied, the dark: prefix always
comes first.
<element class="md:via/o" style=" --md-via: /* value */; --md-via-o: /* value */; "></element><element class="dark:sm:via/o" style=" --dark-sm-via: /* value */; --dark-sm-via-o: /* value */; "></element>
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
and dark mode.
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 via/o::before" style=" --via-before: /* value */; --via-o-before: /* value */; "></element><element class="content-after via/o::after" style=" --via-after: /* value */; --via-o-after: /* value */; "></element>
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.
The .via-position
class is flagged as a value-driven selector.
The variable --via-position is required.
<element class="via-position" style="--via-position: /* value */;" />
Responsive
Prefix
.via-position
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:via-position" style="--md-via-position: /* 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
.
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 via-position::before" style="--via-position-before: /* value */;" /><element class="content-after via-position::after" style="--via-position-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.
The .to
class is flagged as a value-driven selector.
The variable --to is required.
<element class="to" style="--to: /* value */;" />
Responsive & Dark Mode
Prefix
.to
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
If dark mode is applied, the dark: prefix always
comes first.
<element class="md:to" style="--md-to: /* value */;" /><element class="dark:sm:to" style="--dark-sm-to: /* 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
and dark mode.
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 to::before" style="--to-before: /* value */;" /><element class="content-after to::after" style="--to-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.
The .to/o
class is flagged as a value-driven selector.
The variables --to and --to-o are required.
<element class="to/o" style=" --to: /* value */; --to-o: /* value */; "></element>
Responsive & Dark Mode
Prefix
.to/o
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
If dark mode is applied, the dark: prefix always
comes first.
<element class="md:to/o" style=" --md-to: /* value */; --md-to-o: /* value */; "></element><element class="dark:sm:to/o" style=" --dark-sm-to: /* value */; --dark-sm-to-o: /* value */; "></element>
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
and dark mode.
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 to/o::before" style=" --to-before: /* value */; --to-o-before: /* value */; "></element><element class="content-after to/o::after" style=" --to-after: /* value */; --to-o-after: /* value */; "></element>
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.
The .to-position
class is flagged as a value-driven selector.
The variable --to-position is required.
<element class="to-position" style="--to-position: /* value */;" />
Responsive
Prefix
.to-position
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:to-position" style="--md-to-position: /* 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
.
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 to-position::before" style="--to-position-before: /* value */;" /><element class="content-after to-position::after" style="--to-position-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.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.to-position
Sets the gradient to-stop position via --to-position. E.g. 90%.
gradient-position
Sets gradient position/interpolation via --gradient-position, falling back to oklab.
CSS Rules
.gradient-position { --tw-gradient-position: var(--gradient-position, in oklab);}
Usage
The .gradient-position
class is flagged as a value-driven selector.
The variable --gradient-position is required.
<element class="gradient-position" style="--gradient-position: /* value */;" />
Responsive
Prefix
.gradient-position
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:gradient-position" style="--md-gradient-position: /* 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
.
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 gradient-position::before" style="--gradient-position-before: /* value */;" /><element class="content-after gradient-position::after" style="--gradient-position-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.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.gradient-position
Sets gradient position/interpolation via --gradient-position, falling back to oklab.
linear
Creates a linear gradient background using configured gradient stops.
CSS Rules
.linear { --tw-gradient-position: var(--linear, in oklab); background-image: var(--linear, in oklab);}
Usage
The .linear
class is flagged as a value-driven selector.
The variable --linear is required.
<element class="linear" style="--linear: /* value */;" />
Responsive
Prefix
.linear
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear" style="--md-linear: /* 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
.
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 linear::before" style="--linear-before: /* value */;" /><element class="content-after linear::after" style="--linear-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.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.linear
Creates a linear gradient background using configured gradient stops.
linear-to-b
Sets gradient direction to the bottom. Combine with from, via, and to.
CSS Rules
.linear-to-b { --tw-gradient-position: to bottom in oklab;}
Usage
<element class="linear-to-b" />
Responsive
Prefix
.linear-to-b
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-b" />
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
.
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.
Sets gradient direction to the bottom. Combine with from, via, and to.
linear-to-bl
Points a linear gradient toward the bottom left and uses oklab interpolation.
CSS Rules
.linear-to-bl { --tw-gradient-position: to bottom left in oklab;}
Usage
<element class="linear-to-bl" />
Responsive
Prefix
.linear-to-bl
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-bl" />
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
.
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.
Points a linear gradient toward the bottom left and uses oklab interpolation.
linear-to-br
Sets gradient direction to bottom-right. Combine with from, via, and to.
CSS Rules
.linear-to-br { --tw-gradient-position: to bottom right in oklab;}
Usage
<element class="linear-to-br" />
Responsive
Prefix
.linear-to-br
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-br" />
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
.
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.
Sets gradient direction to bottom-right. Combine with from, via, and to.
linear-to-l
Points a linear gradient toward the left and uses oklab interpolation.
CSS Rules
.linear-to-l { --tw-gradient-position: to left in oklab;}
Usage
<element class="linear-to-l" />
Responsive
Prefix
.linear-to-l
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-l" />
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
.
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.
Points a linear gradient toward the left and uses oklab interpolation.
linear-to-r
Sets gradient direction to the right. Combine with from, via, and to.
CSS Rules
.linear-to-r { --tw-gradient-position: to right in oklab;}
Usage
<element class="linear-to-r" />
Responsive
Prefix
.linear-to-r
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-r" />
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
.
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.
Sets gradient direction to the right. Combine with from, via, and to.
linear-to-t
Points a linear gradient toward the top and uses oklab interpolation.
CSS Rules
.linear-to-t { --tw-gradient-position: to top in oklab;}
Usage
<element class="linear-to-t" />
Responsive
Prefix
.linear-to-t
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-t" />
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
.
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.
Points a linear gradient toward the top and uses oklab interpolation.
linear-to-tl
Points a linear gradient toward the top left and uses oklab interpolation.
CSS Rules
.linear-to-tl { --tw-gradient-position: to top left in oklab;}
Usage
<element class="linear-to-tl" />
Responsive
Prefix
.linear-to-tl
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-tl" />
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
.
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.
Points a linear gradient toward the top left and uses oklab interpolation.
linear-to-tr
Points a linear gradient toward the top right and uses oklab interpolation.
CSS Rules
.linear-to-tr { --tw-gradient-position: to top right in oklab;}
Usage
<element class="linear-to-tr" />
Responsive
Prefix
.linear-to-tr
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:linear-to-tr" />
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
.
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.
Points a linear gradient toward the top right and uses oklab interpolation.
Adding a linear gradient
Use the linear utility together with a direction modifier like linear-to-r, linear-to-t, or linear-to-bl, and the color stop utilities, to add a linear gradient to an element. Use the --linear custom property to set a custom angle and interpolation mode (e.g., 65deg in oklab):
<div class="h rounded-lg linear linear-to-r from to" style=" --h: 14; --from: var(--color-cyan-500); --to: var(--color-blue-500) "></div><div class="h rounded-lg linear linear-to-t from to" style=" --h: 14; --from: var(--color-sky-500); --to: var(--color-indigo-500) "></div><div class="h rounded-lg linear linear-to-bl from to" style=" --h: 14; --from: var(--color-violet-500); --to: var(--color-fuchsia-500) "></div><div class="h rounded-lg linear from to" style=" --h: 14; --linear: 65deg in oklab; --from: var(--color-purple-500); --to: var(--color-pink-500) "></div>
Adding a radial gradient
Use the radial utility with the color stop utilities to add a radial gradient to an element. Use the --radial custom property to set a custom position (e.g., at 50% 75%):
<div class="display-flex justify-around p sm:p" style=" --p: 8; --sm-p: 12 "> <div class="size rounded-full radial from to from-position sm:size" style=" --size: 18; --from: var(--color-pink-400); --to: var(--color-fuchsia-700); --from-position: 40%; --sm-size: 24 " ></div> <div class="size rounded-full radial from via to to-position sm:size" style=" --size: 18; --radial: at 50% 75%; --from: var(--color-sky-200); --via: var(--color-blue-400); --to: var(--color-indigo-900); --to-position: 90%; --sm-size: 24 " ></div> <div class="size rounded-full radial from to to-position sm:size" style=" --size: 18; --radial: at 25% 25%; --from: var(--color-white); --to: var(--color-zinc-900); --to-position: 75%; --sm-size: 24 " ></div></div>
Adding a conic gradient
Use the conic utility with the color stop utilities to add a conic gradient to an element. Use the --conic custom property to set a custom starting angle or interpolation mode (e.g., from 180deg in oklab, or in oklch decreasing hue):
<div class="display-flex justify-around p sm:p" style=" --p: 8; --sm-p: 12 "> <div class="size rounded-full conic from to to-position sm:size" style=" --size: 18; --from: var(--color-blue-600); --to: var(--color-sky-400); --to-position: 50%; --sm-size: 24 " ></div> <div class="size rounded-full conic from via to sm:size" style=" --size: 18; --conic: from 180deg in oklab; --from: var(--color-indigo-600); --via: var(--color-indigo-50); --to: var(--color-indigo-600); --sm-size: 24 " ></div> <div class="size rounded-full conic from via to sm:size" style=" --size: 18; --conic: in oklch decreasing hue; --from: var(--color-violet-700); --via: var(--color-lime-300); --to: var(--color-violet-700); --sm-size: 24 " ></div></div>
Setting gradient color stops
Use the from, via, and to utilities together with the --from, --via, and --to custom properties to set the colors of the gradient stops:
<div class="rounded-lg linear linear-to-r h from via to" style=" --h: 10; --from: var(--color-indigo-500); --via: var(--color-purple-500); --to: var(--color-pink-500); "></div>
Setting gradient stop positions
Use the from-position, via-position, and to-position utilities together with the --from-position, --via-position, and --to-position custom properties to set more precise positions for the gradient color stops:
10%
30%
90%
<div class="rounded-lg linear linear-to-r h from from-position via via-position to to-position" style=" --h: 10; --from: var(--color-indigo-500); --from-position: 10%; --via: var(--color-sky-500); --via-position: 30%; --to: var(--color-emerald-500); --to-position: 90%;"></div>