Table of Contents

Class ShadowBuilder

Namespace
TwBlazor.Builders
Assembly
TwBlazor.dll

Provides utility methods for generating CSS shadow classes based on elevation levels.

public class ShadowBuilder
Inheritance
ShadowBuilder
Inherited Members

Constructors

ShadowBuilder(TwBlazorOptions)

Provides utility methods for generating CSS shadow classes based on elevation levels.

public ShadowBuilder(TwBlazorOptions options)

Parameters

options TwBlazorOptions

Methods

GetButtonShadow(TwButtonTheme?, Shadow?, bool, bool)

Gets the Tailwind CSS shadow classes for button states from theme configuration.

public string GetButtonShadow(TwButtonTheme? buttonTheme, Shadow? overrideShadow = null, bool includeHover = true, bool includeActive = true)

Parameters

buttonTheme TwButtonTheme

The button theme configuration containing shadow settings.

overrideShadow Shadow?

When set, overrides the theme's default button shadow (e.g. an explicit Shadow parameter passed to the component instance). Leave null to fall back to buttonTheme's configured shadow.

includeHover bool

Whether to include hover state shadow.

includeActive bool

Whether to include active state shadow.

Returns

string

The corresponding Tailwind CSS classes.

GetShadow(Shadow?)

Gets the Tailwind CSS shadow class for the specified shadow level.

public string GetShadow(Shadow? shadow)

Parameters

shadow Shadow?

The shadow level.

Returns

string

The corresponding Tailwind CSS class.