Class TwTagInputTheme
- Namespace
- TwBlazor.Configuration.Components
- Assembly
- TwBlazor.dll
Theme configuration for the tag input (TwTagInput). Override any property to customize tag input styles globally.
[ExcludeFromCodeCoverage]
public class TwTagInputTheme
- Inheritance
-
TwTagInputTheme
- Inherited Members
Remarks
The field's border, background, focus ring and rounding come from TwInputTheme through the input variant, the same as TwTextfield<T>, and the clear button and the suggestions list reuse TwInputTheme's clear button and listbox classes. Each tag is a TwChip, styled by TwChipTheme. This theme only holds the layout that is particular to a field of tags.
Constructors
TwTagInputTheme()
public TwTagInputTheme()
Properties
ChipsPadding
Gets or sets the start padding applied while the field shows tags, so the first tag sits as far from the start edge as it does from the top and bottom. Not applied to the Default variant, which has no side padding.
public string ChipsPadding { get; set; }
Property Value
ClearButton
Gets or sets the classes added to ClearButton for the clear button, such as its height, since the field can be several rows tall.
public string ClearButton { get; set; }
Property Value
DenseSize
public required string DenseSize { get; set; }
Property Value
EndContent
Gets or sets the classes for the area over the end of the field that holds the clear button. It spans the field's height and centers the button vertically.
public required string EndContent { get; set; }
Property Value
Field
Gets or sets the layout classes for the field: a wrapping row holding the tags and the text input, on top of the input variant's border and background.
public required string Field { get; set; }
Property Value
HelperText
Gets or sets the classes for the helper text shown under the field (HelperText).
public required string HelperText { get; set; }
Property Value
Remarks
The text is read out with the field, and needs the 4.5:1 text contrast ratio against the page.
Input
Gets or sets the classes for the text input the tags are typed into. It fills the rest of the row and moves onto a new row when too little room is left.
public required string Input { get; set; }
Property Value
Size
Gets or sets the minimum height and text size of the field, so a field with no tags lines up with a TwTextfield<T>. It grows taller as its tags wrap onto more rows.
public required string Size { get; set; }
Property Value
TagList
Gets or sets the classes for the list that holds the tags. It should not create a box of its own
(display: contents), so the tags and the text input wrap together as one row.
public required string TagList { get; set; }