PowerShell Universal
Ironman Software
Forums
Discord
Demo
Search…
v2
About
Get Started
Additional Resources
Installation
Licensing
System Requirements
Supported Browsers
Cmdlet Help
Templates
API
About
Endpoints
Security
Error Handling
Rate Limiting
Automation
About Automation
Scripts
Jobs
Schedules
Terminals
Triggers
User Interfaces
About
Dashboards
Building Dashboards
Components
Dashboards
Pages
Dynamic Regions
Element
Error Boundary
HTML
Building Custom Components
Data Display
Data Visualization
Feedback
Inputs
Autocomplete
Button
Checkbox
Code Editor
Date Picker
Editor
Floating Action Button
Form
Radio
Select
Slider
Switch
Textbox
Time Picker
Transfer List
Upload
Navigation
Layout
Utilities
Surfaces
Interaction
Marketplace
Role Based Access
Scheduled Endpoints
Sessions
Themes
Custom Variable Scopes
Migrating From Universal Dashboard 2.9
Pages
Platform
Cache
Desktop Mode
Modules
Monitoring
Published Folders
Templates
Variables
Configuration
About
API
Environments
Git
Hosting
Login Page
Management API
Settings
Security
Repository
Running as a Service Account
Development
Debugging Scripts
Editor
Hangfire
Logging
Profiling
Visual Studio Code Extension
Changelog
Extension Changelog
Legacy Universal Dashboard Docs
Powered By
GitBook
Button
Button component for Universal Dashboard
Buttons allow users to take actions, and make choices, with a single tap.
Contained Button
Contained buttons are high-emphasis, distinguished by their use of elevation and fill. They contain actions that are primary to your app.
1
New-UDButton
-
Variant
'contained'
-
Text
'Default'
Copied!
Outlined Button
Outlined buttons are medium-emphasis buttons. They contain actions that are important, but aren’t the primary action in an app.
1
New-UDButton
-
Variant
'outlined'
-
Text
'Default'
Copied!
Control Button Size
You can control the pixel size of a button based on pixel size by using the Style parameter
1
New-UDButton
-
Id
"Submit"
-
Text
"Submit"
-
Style @
{
Width =
"150px"
;
Height =
"100px"
}
Copied!
Buttons with icons and label
Sometimes you might want to have icons for certain button to enhance the UX of the application as we recognize logos more easily than plain text. For example, if you have a delete button you can label it with a dustbin icon.
1
New-UDButton
-
Icon
(
New-UDIcon
-
Icon trash
)
-
Text
'Delete'
Copied!
Buttons with event handlers
You can specify a script block to execute when the button is clicked
1
New-UDButton
-
Text
'Message Box'
-
OnClick
{
2
Show-UDToast
-
Message
'Hello, world!'
3
}
Copied!
API
​
New-UDButton
​
​
Previous
Autocomplete
Next
Checkbox
Last modified
5mo ago
Copy link
Contents
Contained Button
Outlined Button
Control Button Size
Buttons with icons and label
Buttons with event handlers
API