Class TwMenuTheme
- Namespace
- TwBlazor.Configuration.Components
- Assembly
- TwBlazor.dll
Theme configuration for menus (TwMenu, TwContextMenu and their items and submenus), which share one look. Override any property to customize menu styles globally.
[ExcludeFromCodeCoverage]
public class TwMenuTheme
- Inheritance
-
TwMenuTheme
- Inherited Members
Remarks
The button that opens a menu is a TwButton, or a TwIcon button when the menu is icon only, so it takes its look from those themes.
Constructors
TwMenuTheme()
public TwMenuTheme()
Properties
CheckIcon
Gets or sets the classes for the tick beside a checkbox item. It keeps its space while unticked, so the labels line up.
public required string CheckIcon { get; set; }
Property Value
CheckIconHidden
Gets or sets the classes added to the tick while a checkbox item is unticked, which hide it but keep its space
(e.g. invisible).
public required string CheckIconHidden { get; set; }
Property Value
ContextArea
Gets or sets the classes for the area a TwContextMenu opens its menu from. When the area is focusable it needs a visible focus indicator.
public string ContextArea { get; set; }
Property Value
Divider
Gets or sets the classes for the line between groups of items.
public required string Divider { get; set; }
Property Value
GroupLabel
Gets or sets the classes for the heading of a group of items.
public required string GroupLabel { get; set; }
Property Value
Item
Gets or sets the classes for a menu item, including its hover and focus states. Focus moves between items with the arrow keys, so the focused item needs a visible indicator.
public required string Item { get; set; }
Property Value
ItemDestructive
Gets or sets the classes added to a destructive item, such as Delete, which marks it in a warning colour. Colour is never the only sign, so give the item a clear label too.
public string ItemDestructive { get; set; }
Property Value
ItemDisabled
Gets or sets the classes added to a disabled menu item.
public required string ItemDisabled { get; set; }
Property Value
ItemIcon
Gets or sets the classes for the icon at the start of a menu item.
public required string ItemIcon { get; set; }
Property Value
ItemInset
Gets or sets the classes added to an inset item, which indents its text to line up with items that have an icon or a tick.
public string ItemInset { get; set; }
Property Value
ItemShortcut
Gets or sets the classes for the keyboard shortcut hint at the end of an item (e.g. Ctrl+C). It is
pushed to the end of the item, so the hints of several items line up.
public string ItemShortcut { get; set; }
Property Value
Panel
Gets or sets the classes for the menu panel. The menu script positions it with fixed positioning, so it is not clipped by a scrolling container such as a table.
public required string Panel { get; set; }
Property Value
Root
Gets or sets the classes for the element around the button and the menu.
public required string Root { get; set; }
Property Value
SubmenuIcon
Gets or sets the classes for the arrow at the end of the item that opens a submenu.
public string SubmenuIcon { get; set; }
Property Value
SubmenuTrigger
Gets or sets the classes added to the item that opens a submenu, including its look while the submenu is open
(it has aria-expanded="true" then).
public string SubmenuTrigger { get; set; }