
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@itrulia/nova-skeletons
Advanced tools
CSS Utility library to create beautiful skeleton screens
This CSS utility library allows you to create beautiful skeleton screens without much hassle. It has been built for simplicity and maintainability.
To install it you need to require it like this:
npm install --save @itrulia/nova-skeletons
This will add the @itrulia/nova-skeletons dependency in to your package.json.
Now you can either import the SCSS or the CSS depending on what preprocessor you are using (or not using).
You can do this by in SCSS like this:
@import "node_modules/@itrulia/nova-skeletons/skeletons";
Or add it to your HTML like this:
<link rel="stylesheet" type="text/css" href="/node_modules/@itrulia/nova-skeletons/skeletons.css">
You should attach the base class c-skeleton
to the root of your skeleton screen HTML. While this class has no styles attached to it, you can use it if you need to increase the specifity of your CSS if needed. + It also helps to keep the HTML a little bit more grouped.
The simplest skeleton you can create is one of text that is loading. For this we can use the c-skeleton__text
class.
<div class="c-skeleton">
<div class="c-skeleton__text"></div>
</div>
/* Removes the margin on top/bottom of the text */
.c-skeleton__text--small-height {...}
/* Makes the display style inline block */
.c-skeleton__text--inline {...}
/* Makes the text width full width */
.c-skeleton__text--full {...}
/* Makes the text width big */
.c-skeleton__text--big {...}
/* Makes the text width bigger */
.c-skeleton__text--bigger {...}
/* Makes the text width small */
.c-skeleton__text--small {...}
/* Makes the text width smaller */
.c-skeleton__text--smaller {...}
/* Makes the text width very tiny */
.c-skeleton__text--tiny {...}
If you want to skeleton an image/video, you can use the class c-skeleton__figure
. This class adjusts to the parents width and height.
<div class="c-skeleton" style="width: 50px; height: 50px;">
<div class="c-skeleton__figure"></div>
</div>
Pro tip: If the non loading state has a border radius, you simply can add a class to it that adds the border radius to the skeleton aswell. In most cases, the skeleton can have the same classes attached as the loaded state!
Here's a brief intro about what a developer must do in order to start developing the project further:
git clone https://github.com/Itrulia/nova-skeletons
cd nova-skeletons/
npm install
This will download all dependencies so that you are ready to go.
You will need to publish this to the github and npm repository.
To do this you will need to do the following steps:
v
prefix (e.g. v1.1.0
) and add release notes for what has changed so everyone knows what to do when there are breaking changes and what has changed for them.npm publish
. Further information can be founde on the official npm documentation page.Type: color
Default: #eee
Type: color
Default: #e7e7e9
When you publish something open source, one of the greatest motivations is that anyone can just jump in and start contributing to your project.
To make it easier for everyone to contribute to this project and understand it, please always update the documentation when you create or modify anything.
Also always try to improve atleast 1 small thing when you are already there so that over time the project gets better and better, this is also known as The Boy Scout Rule.
Copyright (c) 2018 Karl Merkli
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
CSS Utility library to create beautiful skeleton screens
We found that @itrulia/nova-skeletons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.