Table of Contents

Class TwResponsiveClass

Namespace
TwBlazor.Configuration
Assembly
TwBlazor.dll

One Tailwind utility written out at every breakpoint, e.g. grid-cols-2, sm:grid-cols-2 and so on.

public class TwResponsiveClass
Inheritance
TwResponsiveClass
Inherited Members

Remarks

Tailwind only compiles class names it can find written in full, so a breakpoint prefix can never be added at runtime. Each breakpoint's class is spelled out here instead, once, in the theme file.

Constructors

TwResponsiveClass()

Initializes an empty set of classes.

public TwResponsiveClass()

TwResponsiveClass(string, string, string, string, string, string)

Initializes the classes for every breakpoint at once.

public TwResponsiveClass(string baseClass, string sm, string md, string lg, string xl, string xl2)

Parameters

baseClass string

The class for every screen width, with no prefix.

sm string

The class with the sm: prefix.

md string

The class with the md: prefix.

lg string

The class with the lg: prefix.

xl string

The class with the xl: prefix.

xl2 string

The class with the 2xl: prefix.

Properties

Base

Gets or sets the class for every screen width, with no prefix.

public string Base { get; set; }

Property Value

string

Lg

Gets or sets the class with the lg: prefix.

public string Lg { get; set; }

Property Value

string

Md

Gets or sets the class with the md: prefix.

public string Md { get; set; }

Property Value

string

Sm

Gets or sets the class with the sm: prefix.

public string Sm { get; set; }

Property Value

string

Xl

Gets or sets the class with the xl: prefix.

public string Xl { get; set; }

Property Value

string

Xl2

Gets or sets the class with the 2xl: prefix.

public string Xl2 { get; set; }

Property Value

string

Methods

Get(Breakpoint)

Gets the class for a breakpoint.

public string Get(Breakpoint breakpoint)

Parameters

breakpoint Breakpoint

The breakpoint.

Returns

string

The class, or an empty string when none is set.