
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@angular2-material/button
Advanced tools
md-button is an HTML <button> or <a> tag enhanced with styling and animation to match the
Material Design button spec.
Users should employ a button element (<button>) when clicking triggers some action in the current
view without navigating. An anchor element (<a>) should be used when clicking navigates
the user to another URL. Depending on which element is used, the component will either be an
instance of MdButton or MdAnchor. Visually, the two are identical.
There are five types of buttons:
md-button
md-raised-button
md-icon-button
md-fab
md-mini-fab
Each is an attribute directive that you can add to a button or a tag. You can provide custom content to the button by inserting it
between the tags, as you would with a normal button.
Example:
<button md-button>FLAT</button>
<button md-raised-button>RAISED</button>
<button md-icon-button>
<md-icon class="md-24">favorite</md-icon>
</button>
<button md-fab>
<md-icon class="md-24">add</md-icon>
</button>
<button md-mini-fab>
<md-icon class="md-24">add</md-icon>
</button>
Output:
All button types can be themed to match your "primary" palette, your "accent" palette, or your "warn" palette using the color attribute.
Simply pass in the palette name.
In flat buttons, the palette chosen will affect the text color, while in other buttons, it affects the background.
Example:
<button md-raised-button color="primary">PRIMARY</button>
<button md-raised-button color="accent">ACCENT</button>
<button md-raised-button color="warn">WARN</button>
Output:
You can disable any button type through the native disabled property. You can add it directly, or bind it to a property on your
component class by adding [disabled]="isDisabled" given that the isDisabled
property exists.
<button md-button disabled>OFF</button>
<button md-raised-button [disabled]="isDisabled">OFF</button>
<button md-mini-fab [disabled]="isDisabled"><md-icon>check</md-icon></button>
Output:
md-button is added to an existing button or a tag, it enjoys all the accessibility natively built into these elements.We will also be adding ink ripples to buttons in an upcoming milestone.
Properties:
| Name | Type | Description |
|---|---|---|
color | `"primary" | "accent" |
disabled | boolean | Whether or not the button is disabled |
disableRipple | boolean | Whether the ripple effect when the button is clicked should be disabled |
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.