Table of Contents

Class TwToggleTheme

Namespace
TwBlazor.Configuration.Components
Assembly
TwBlazor.dll

Theme configuration shared by toggle buttons (TwToggle) and toggle groups (TwToggleGroup<T>), whose items are toggles. Override any property to customize toggle styles globally.

[ExcludeFromCodeCoverage]
public class TwToggleTheme
Inheritance
TwToggleTheme
Inherited Members

Constructors

TwToggleTheme()

public TwToggleTheme()

Properties

Base

Gets or sets the base classes applied to every toggle: layout, typography and transition.

public required string Base { get; set; }

Property Value

string

Colors

Gets or sets the background and text classes of a pressed toggle for each Color. Used when the toggle or group sets a Color; otherwise Pressed or GroupPressed is used.

public required TwBlazorPalette Colors { get; set; }

Property Value

TwBlazorPalette

DefaultVariant

Gets or sets the variant used when a toggle or toggle group does not set its own.

public ToggleVariant? DefaultVariant { get; set; }

Property Value

ToggleVariant?

Remarks

Default is Text.

Disabled

Gets or sets the classes applied to a disabled toggle.

public required string Disabled { get; set; }

Property Value

string

GroupBase

Gets or sets the base classes of the toggle group container: layout, gap and padding.

public required string GroupBase { get; set; }

Property Value

string

GroupHorizontal

Gets or sets the classes of a horizontal toggle group (the default).

public required string GroupHorizontal { get; set; }

Property Value

string

GroupOutlined

Gets or sets the classes of a Outlined toggle group: the border around its items.

public required string GroupOutlined { get; set; }

Property Value

string

GroupPressed

Gets or sets the background and text classes of a pressed item with no Color in a Text toggle group, where the items sit on a filled bar.

public required string GroupPressed { get; set; }

Property Value

string

GroupText

Gets or sets the classes of a Text toggle group: the filled bar its items sit on.

public required string GroupText { get; set; }

Property Value

string

GroupVertical

Gets or sets the classes of a vertical toggle group.

public required string GroupVertical { get; set; }

Property Value

string

Hover

Gets or sets the hover classes of a toggle that is not pressed. Left off while the toggle is disabled.

public required string Hover { get; set; }

Property Value

string

IconLg

Gets or sets the size classes of the icon in a large toggle.

public required string IconLg { get; set; }

Property Value

string

IconMd

Gets or sets the size classes of the icon in a medium toggle.

public required string IconMd { get; set; }

Property Value

string

IconSm

Gets or sets the size classes of the icon in a small toggle.

public required string IconSm { get; set; }

Property Value

string

Lg

Gets or sets the height, minimum width, padding and text size of a large toggle.

public required string Lg { get; set; }

Property Value

string

Md

Gets or sets the height, minimum width, padding and text size of a medium toggle (the default).

public required string Md { get; set; }

Property Value

string

Outlined

Gets or sets the border classes of a standalone Outlined toggle.

public required string Outlined { get; set; }

Property Value

string

Pressed

Gets or sets the background and text classes of a pressed toggle with no Color.

public required string Pressed { get; set; }

Property Value

string

PressedForcedColors

Gets or sets the classes added to every pressed toggle so the pressed state stays visible in forced colors (Windows high contrast) mode, where backgrounds are replaced by system colors.

public required string PressedForcedColors { get; set; }

Property Value

string

Sm

Gets or sets the height, minimum width, padding and text size of a small toggle.

public required string Sm { get; set; }

Property Value

string

ToggleRounded

Gets or sets the default border radius for toggles and toggle groups.

public Rounded? ToggleRounded { get; set; }

Property Value

Rounded?

Remarks

If not set, falls back to the global DefaultRounded. The items of a toggle group use one step tighter than the group, so their corners follow the group's. Default is null (uses global default).

Unpressed

Gets or sets the text classes of a toggle that is not pressed.

public required string Unpressed { get; set; }

Property Value

string