Socket
Socket
Sign inDemoInstall

@material/switch

Package Overview
Dependencies
Maintainers
12
Versions
1687
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/switch - npm Package Compare versions

Comparing version 0.35.0 to 0.35.2

3

package.json
{
"name": "@material/switch",
"description": "The Material Components for the web switch component",
"version": "0.35.0",
"version": "0.35.2",
"license": "Apache-2.0",

@@ -18,2 +18,3 @@ "keywords": [

"@material/elevation": "^0.35.0",
"@material/rtl": "^0.35.0",
"@material/theme": "^0.35.0"

@@ -20,0 +21,0 @@ },

@@ -13,3 +13,3 @@ <!--docs:

<a class="article__asset-link"
href="https://material-components-web.appspot.com/switch.html">
href="https://material-components.github.io/material-components-web-catalog/#/component/switch">
<img src="{{ site.rootpath }}/images/mdc_web_screenshots/switches.png" width="37" alt="Switches screenshot">

@@ -19,5 +19,3 @@ </a>

The MDC Switch component is a spec-aligned switch component adhering to the
[Material Design Switch requirements](https://material.io/guidelines/components/selection-controls.html#selection-controls-switch).
It works without JavaScript.
Switches toggle the state of a single settings option on or off, and are mobile preferred.

@@ -28,6 +26,6 @@ ## Design & API Documentation

<li class="icon-list-item icon-list-item--spec">
<a href="https://material.io/guidelines/components/selection-controls.html#selection-controls-switch">Material Design guidelines: Switches</a>
<a href="https://material.io/go/design-switches">Material Design guidelines: Switches</a>
</li>
<li class="icon-list-item icon-list-item--link">
<a href="https://material-components-web.appspot.com/switch.html">Demo</a>
<a href="https://material-components.github.io/material-components-web-catalog/#/component/switch">Demo</a>
</li>

@@ -42,3 +40,3 @@ </ul>

## Usage
## Basic Usage

@@ -56,6 +54,7 @@ ### HTML Structure

```
## Variant
#### Disabled Switch
### Disabled Switch
Users can add `disabled` directly to the input element or set the fieldset containing the switch to `disabled` to disable a switch. Disabled switches cannot be interacted with and have no visual interaction effect.
Users can add the `disabled` attribute directly to the `<input>` element or a parent `<fieldset>` element to disable a switch.

@@ -72,2 +71,4 @@ ```html

## Style Customization
### CSS Classes

@@ -77,6 +78,6 @@

--- | ---
`mdc-switch` | Mandatory, for the parent element
`mdc-switch__native-control` | Mandatory, for the input checkbox
`mdc-switch__background` | Mandatory, for the background element
`mdc-switch__knob` | Mandatory, for the knob element
`mdc-switch` | Mandatory, for the parent element.
`mdc-switch__native-control` | Mandatory, for the input checkbox.
`mdc-switch__background` | Mandatory, for the background element.
`mdc-switch__knob` | Mandatory, for the knob element.

@@ -90,4 +91,4 @@ ### Sass Mixins

--- | ---
`mdc-switch-track-color($color)` | Sets the track color
`mdc-switch-knob-color($color)` | Sets the knob color
`mdc-switch-focus-indicator-color($color)` | Sets the focus indicator color
`mdc-switch-track-color($color)` | Sets the track color.
`mdc-switch-knob-color($color)` | Sets the knob color.
`mdc-switch-focus-indicator-color($color)` | Sets the focus indicator color.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc