Style
/ API Reference
Style
/ API Reference

responsiveValue

A function to cast a responsive array value to its expected type.

Important Note

This requires the responsiveValuePlugin to be configured.

The Gist

import { responsiveValue } from '@weser/style'

const style = responsiveValue(['blue', , 'red'])

Parameters

ParameterTypeDescription
valueArray<T>The responsive array value to cast.

Returns

(T) The cast value.

On this page