Interface: ThemeHelper

twind.ThemeHelper

Callable

ThemeHelper<Section>(section: Section): function

Type parameters:

NameType
Sectioncolors | spacing | durations | screens | animation | backdropBlur | backdropBrightness | backdropContrast | backdropGrayscale | backdropHueRotate | backdropInvert | backdropOpacity | backdropSaturate | backdropSepia | backgroundColor | backgroundImage | backgroundOpacity | backgroundPosition | backgroundSize | blur | borderColor | borderOpacity | borderRadius | borderWidth | boxShadow | brightness | container | contrast | cursor | divideColor | divideOpacity | divideWidth | dropShadow | fill | flex | flexGrow | flexShrink | fontFamily | fontSize | fontWeight | gap | gradientColorStops | grayscale | gridAutoColumns | gridAutoRows | gridColumn | gridColumnEnd | gridColumnStart | gridRow | gridRowEnd | gridRowStart | gridTemplateColumns | gridTemplateRows | height | hueRotate | inset | invert | keyframes | letterSpacing | lineHeight | listStyleType | margin | maxHeight | maxWidth | minHeight | minWidth | objectPosition | opacity | order | outline | padding | placeholderColor | placeholderOpacity | ringColor | ringOffsetColor | ringOffsetWidth | ringOpacity | ringWidth | rotate | saturate | scale | sepia | skew | space | stroke | strokeWidth | textColor | textOpacity | transformOrigin | transitionDelay | transitionDuration | transitionProperty | transitionTimingFunction | translate | width | zIndex

Parameters:

NameType
sectionSection

Returns: (context: Context) => Record<string, ThemeSectionType<Theme[Section]>>

Defined in: src/types/theme.ts:28

ThemeHelper<Section>(keypath: `${Section}.${string}`): function

Type parameters:

NameType
Sectioncolors | spacing | durations | screens | animation | backdropBlur | backdropBrightness | backdropContrast | backdropGrayscale | backdropHueRotate | backdropInvert | backdropOpacity | backdropSaturate | backdropSepia | backgroundColor | backgroundImage | backgroundOpacity | backgroundPosition | backgroundSize | blur | borderColor | borderOpacity | borderRadius | borderWidth | boxShadow | brightness | container | contrast | cursor | divideColor | divideOpacity | divideWidth | dropShadow | fill | flex | flexGrow | flexShrink | fontFamily | fontSize | fontWeight | gap | gradientColorStops | grayscale | gridAutoColumns | gridAutoRows | gridColumn | gridColumnEnd | gridColumnStart | gridRow | gridRowEnd | gridRowStart | gridTemplateColumns | gridTemplateRows | height | hueRotate | inset | invert | keyframes | letterSpacing | lineHeight | listStyleType | margin | maxHeight | maxWidth | minHeight | minWidth | objectPosition | opacity | order | outline | padding | placeholderColor | placeholderOpacity | ringColor | ringOffsetColor | ringOffsetWidth | ringOpacity | ringWidth | rotate | saturate | scale | sepia | skew | space | stroke | strokeWidth | textColor | textOpacity | transformOrigin | transitionDelay | transitionDuration | transitionProperty | transitionTimingFunction | translate | width | zIndex

Parameters:

NameType
keypath`${Section}.${string}`

Returns: (context: Context) => undefined | ThemeSectionType<Theme[Section]>

Defined in: src/types/theme.ts:31

ThemeHelper<Section>(keypath: `${Section}.${string}`, defaultValue: NonNullable<ThemeSectionType<Theme[Section]>>): function

Type parameters:

NameType
Sectioncolors | spacing | durations | screens | animation | backdropBlur | backdropBrightness | backdropContrast | backdropGrayscale | backdropHueRotate | backdropInvert | backdropOpacity | backdropSaturate | backdropSepia | backgroundColor | backgroundImage | backgroundOpacity | backgroundPosition | backgroundSize | blur | borderColor | borderOpacity | borderRadius | borderWidth | boxShadow | brightness | container | contrast | cursor | divideColor | divideOpacity | divideWidth | dropShadow | fill | flex | flexGrow | flexShrink | fontFamily | fontSize | fontWeight | gap | gradientColorStops | grayscale | gridAutoColumns | gridAutoRows | gridColumn | gridColumnEnd | gridColumnStart | gridRow | gridRowEnd | gridRowStart | gridTemplateColumns | gridTemplateRows | height | hueRotate | inset | invert | keyframes | letterSpacing | lineHeight | listStyleType | margin | maxHeight | maxWidth | minHeight | minWidth | objectPosition | opacity | order | outline | padding | placeholderColor | placeholderOpacity | ringColor | ringOffsetColor | ringOffsetWidth | ringOpacity | ringWidth | rotate | saturate | scale | sepia | skew | space | stroke | strokeWidth | textColor | textOpacity | transformOrigin | transitionDelay | transitionDuration | transitionProperty | transitionTimingFunction | translate | width | zIndex

Parameters:

NameType
keypath`${Section}.${string}`
defaultValueNonNullable<ThemeSectionType<Theme[Section]>>

Returns: (context: Context) => NonNullable<ThemeSectionType<Theme[Section]>>

Defined in: src/types/theme.ts:35

ThemeHelper<Section>(section: Section, key: string | string[]): function

Type parameters:

NameType
Sectioncolors | spacing | durations | screens | animation | backdropBlur | backdropBrightness | backdropContrast | backdropGrayscale | backdropHueRotate | backdropInvert | backdropOpacity | backdropSaturate | backdropSepia | backgroundColor | backgroundImage | backgroundOpacity | backgroundPosition | backgroundSize | blur | borderColor | borderOpacity | borderRadius | borderWidth | boxShadow | brightness | container | contrast | cursor | divideColor | divideOpacity | divideWidth | dropShadow | fill | flex | flexGrow | flexShrink | fontFamily | fontSize | fontWeight | gap | gradientColorStops | grayscale | gridAutoColumns | gridAutoRows | gridColumn | gridColumnEnd | gridColumnStart | gridRow | gridRowEnd | gridRowStart | gridTemplateColumns | gridTemplateRows | height | hueRotate | inset | invert | keyframes | letterSpacing | lineHeight | listStyleType | margin | maxHeight | maxWidth | minHeight | minWidth | objectPosition | opacity | order | outline | padding | placeholderColor | placeholderOpacity | ringColor | ringOffsetColor | ringOffsetWidth | ringOpacity | ringWidth | rotate | saturate | scale | sepia | skew | space | stroke | strokeWidth | textColor | textOpacity | transformOrigin | transitionDelay | transitionDuration | transitionProperty | transitionTimingFunction | translate | width | zIndex

Parameters:

NameType
sectionSection
keystring | string[]

Returns: (context: Context) => undefined | ThemeSectionType<Theme[Section]>

Defined in: src/types/theme.ts:40

ThemeHelper<Section>(section: Section, key: string | string[], defaultValue: NonNullable<ThemeSectionType<Theme[Section]>>): function

Type parameters:

NameType
Sectioncolors | spacing | durations | screens | animation | backdropBlur | backdropBrightness | backdropContrast | backdropGrayscale | backdropHueRotate | backdropInvert | backdropOpacity | backdropSaturate | backdropSepia | backgroundColor | backgroundImage | backgroundOpacity | backgroundPosition | backgroundSize | blur | borderColor | borderOpacity | borderRadius | borderWidth | boxShadow | brightness | container | contrast | cursor | divideColor | divideOpacity | divideWidth | dropShadow | fill | flex | flexGrow | flexShrink | fontFamily | fontSize | fontWeight | gap | gradientColorStops | grayscale | gridAutoColumns | gridAutoRows | gridColumn | gridColumnEnd | gridColumnStart | gridRow | gridRowEnd | gridRowStart | gridTemplateColumns | gridTemplateRows | height | hueRotate | inset | invert | keyframes | letterSpacing | lineHeight | listStyleType | margin | maxHeight | maxWidth | minHeight | minWidth | objectPosition | opacity | order | outline | padding | placeholderColor | placeholderOpacity | ringColor | ringOffsetColor | ringOffsetWidth | ringOpacity | ringWidth | rotate | saturate | scale | sepia | skew | space | stroke | strokeWidth | textColor | textOpacity | transformOrigin | transitionDelay | transitionDuration | transitionProperty | transitionTimingFunction | translate | width | zIndex

Parameters:

NameType
sectionSection
keystring | string[]
defaultValueNonNullable<ThemeSectionType<Theme[Section]>>

Returns: (context: Context) => NonNullable<ThemeSectionType<Theme[Section]>>

Defined in: src/types/theme.ts:44