Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@storefront-ui/tw-plugin-peer-next
Advanced tools
SFUI peer-next plugin for Tailwind
Extend of peer
tailwind class but with +
(first next sibling). Original peer
class is for ~
(every following sibling).
Made with ❤️ by Alokai team and contributors.
Targeting next siblings with ~
is not suitable for HTML structure when pairing input
and label
, every label
after changed input
will also change. Of course we can wrap such groups but having in mind how browser works, nesting and making deeper HTML structure does affect performance of rendering HTML by browser.
npm install --save-dev @storefront-ui/tw-plugin-peer-next
// tailwind.config.ts
import sfPeerNext from '@storefront-ui/tw-plugin-peer-next';
export default {
content: ['your-components-source-directory/*.ts'],
plugins: [sfPeerNext]
};
Plugin extends Tailwindcss peer class and allows to use it as an adjacent sibling combinator.
<form>
<label class="block">
<span class="block text-sm font-medium text-slate-700">Email</span>
<input type="email" class="peer-next ..."/>
<p class="invisible mt-2 text-sm text-pink-600 peer-next-invalid:visible">
Please provide a valid email address.
</p>
</label>
</form>
Make sure to check out StorefrontUI! Read the documentation at https://docs.storefrontui.io/v2/ 🚀
FAQs
SFUI peer-next plugin for Tailwind
The npm package @storefront-ui/tw-plugin-peer-next receives a total of 2,207 weekly downloads. As such, @storefront-ui/tw-plugin-peer-next popularity was classified as popular.
We found that @storefront-ui/tw-plugin-peer-next demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.