Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Garnish UI Toolkit
You can download the latest version of garnishjs on GitHub.
To install via npm:
npm install garnishjs
To install via bower:
bower install garnishjs
To build, run gulp build
.
Use -d
or --dest
options to customize the destination:
gulp build --dest=/path/to/dest
gulp build -d=/path/to/dest
Use -v
or --version
options to customize the version:
gulp build --version=1.0.0
gulp build -v=1.0.0
To watch, run gulp watch
.
To test, run gulp test
.
To watch and test, run gulp watch --test
This element should be used in instances where a trigger button shows or hides content.
Some possible applications include accordion menus, navigation dropdown menus, etc.
To create a disclosure element, use a button with the following properties:
aria-controls
attribute referencing the ID of the element to be toggledaria-haspopup
attribute set to "true"
.aria-expanded
attribute set to either "true"
or "false"
.data-disclosure-trigger
attribute is used to find and instantiate the UI element<button aria-controls="disclosure" aria-expanded="false" aria-haspopup="true" data-disclosure-trigger>Open Menu</button>
<div id="disclosure">
This is the content you want to reveal.
</div>
The disclosure container is positioned absolutely with respect to the trigger element. Because of this, both the disclosure container and the trigger need to be contained inside of a relatively positioned wrapper element.
This element needs to have the attribute data-wrapper
.
Note that this is different from the CustomSelect
element, where dropdowns are positioned relative to the document.
You can change the horizontal alignment of the disclosure by adding a data-align
attribute with one of the following values: left
, center
, or right
.
You may need to align the disclosure menu positioning to a different element inside of the trigger.
In cases like this add a data-align-to
attribute to the disclosure menu with the selector of the element you want to align it with.
Garnish is available under the MIT license.
0.1.48
show
and hide
events.FAQs
Garnish UI toolkit
The npm package garnishjs receives a total of 0 weekly downloads. As such, garnishjs popularity was classified as not popular.
We found that garnishjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.