Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
@material/notched-outline
Advanced tools
Readme
The notched outline is a border around all sides of either a Text Field or Select component. This is used for the Outlined variant of either a Text Field or Select.
npm install @material/notched-outline
<span class="mdc-notched-outline">
<span class="mdc-notched-outline__leading"></span>
<span class="mdc-notched-outline__notch">
<span class="mdc-floating-label">Label</span>
</span>
<span class="mdc-notched-outline__trailing"></span>
</span>
Note that the MDC Floating Label component is placed inside the notch element when used together with MDC Notched Outline.
See the MDC Text Field and MDC Select documentation for information on using Notched Outline in the context of those components.
@use "@material/notched-outline/mdc-notched-outline";
import {MDCNotchedOutline} from '@material/notched-outline';
const notchedOutline = new MDCNotchedOutline(document.querySelector('.mdc-notched-outline'));
See Importing the JS component for more information on how to import JavaScript.
CSS Class | Description |
---|---|
mdc-notched-outline | Mandatory. Container for the outline's sides and notch. |
mdc-notched-outline--notched | Modifier class to open the notched outline. |
mdc-notched-outline--no-label | Modifier class to use when the floating label is empty or not used. |
mdc-notched-outline__leading | Mandatory. Element representing the leading side of the notched outline (before the notch). |
mdc-notched-outline__notch | Mandatory. Element representing the notch. |
mdc-notched-outline__trailing | Mandatory. Element representing the trailing side of the notched outline (after the notch). |
Mixin | Description |
---|---|
color($color) | Customizes the border color of the notched outline. |
stroke-width($width) | Changes notched outline width to a specified pixel value. |
shape-radius($radius, $rtl-reflexive) | Sets the rounded shape to notched outline element with given radius size. Set $rtl-reflexive to true to flip radius values in RTL context, defaults to false. |
floating-label-float-position($positionY, $positionX, $scale) | Sets the position and scale of the floating label inside the notched outline. |
MDCNotchedOutline
Properties and MethodsMethod Signature | Description |
---|---|
notch(notchWidth: number) => void | Opens the notch with the specified width. |
closeNotch() => void | Closes the notch, rendering a full outline. |
If you are using a JavaScript framework, such as React or Angular, you can create a Notched Outline for your framework. Depending on your needs, you can use the Simple Approach: Wrapping MDC Web Vanilla Components, or the Advanced Approach: Using Foundations and Adapters. Please follow the instructions here.
MDCNotchedOutlineAdapter
Method Signature | Description |
---|---|
addClass(className: string) => void | Adds a class to the notched outline element. |
removeClass(className: string) => void | Removes a class from the notched outline element. |
setNotchWidthProperty(width: number) => void | Sets the width of the notch in pixels. |
removeNotchWidthProperty() => void | Removes the width property from the notch element. |
MDCNotchedOutlineFoundation
Method Signature | Description |
---|---|
notch(notchWidth: number) => void | Adds the mdc-notched-outline--notched class and updates the notch element's style based on notchWidth . |
closeNotch() => void | Removes the mdc-notched-outline--notched class. |
FAQs
Unknown package
The npm package @material/notched-outline receives a total of 605,743 weekly downloads. As such, @material/notched-outline popularity was classified as popular.
We found that @material/notched-outline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
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.
Research
Security News
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.