@* Styleguide: the Actions components (Button, Dropdown, FAB, Modal, Swap, Theme controller). *@

DButton

@foreach (var color in Enum.GetValues()) { @color }
@foreach (var variant in Enum.GetValues().Skip(1)) {
@variant @foreach (var color in Enum.GetValues()) { @color }
}
Xs Sm Md Lg Xl
Wide With icon
Block
Active Active primary Disabled Disabled primary Link button Disabled link Clicked @buttonClicks times

DDropdown

Menu (@(dropdownOpen ? "open" : "closed")) Align end Any content: press Escape or click outside to close. Hover
Top Above Right Beside Left Beside

DModal

@foreach (var placement in Enum.GetValues()) { @placement } No backdrop close

Escape and a click outside close the first modal; the second closes only from its buttons or Escape.

Hello from @modalPlacement

Press Escape or click outside to close.

Close
Confirm

A wider box (BoxClass) that ignores clicks on the backdrop.

Cancel OK

DSwap

😈 😇 ON OFF Disabled on Disabled off

Volume: @(swapVolume ? "on" : "off"), sun: @(swapTheme ? "on" : "off")

DFab

Click or focus the button; these boxes contain the fixed FABs (transform-gpu).

Close
Camera
Image
Mic

DThemeController

Overrides the app theme while checked.

Reset
@code { int buttonClicks; bool dropdownOpen; bool modalOpen; bool strictModalOpen; DModalPlacement modalPlacement; bool swapVolume = true; bool swapTheme; bool themeToggle; string themeRadio; void OpenModal(DModalPlacement placement) { modalPlacement = placement; modalOpen = true; } }