Blazorise enums

Learn about Blazorise enums and how to use them to keep UI behavior and styling consistent.

Enums provide a shared vocabulary for sizing, alignment, placement, and component behavior so you can express intent without custom CSS or ad-hoc strings.

How it works

Pick the enum that matches the component parameter you are configuring, then assign the value directly in your markup. For example, choose placement enums for tooltips, alignment enums for text, and sizing enums for components.

Examples

Typical enum usage looks like:

  • ButtonType.Submit to submit a form.
  • TextAlignment.Center to center-align text.
  • TooltipPlacement.Top to place a tooltip above its target.

Reference

On this page