0.2.0 • Published 3 years ago

eleventy-plugin-tailwind-components v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Hyper UI Plugin for 11ty

This plugin gives shortcode access to a (currently) subset of HyperUI by Mark Mead.

Usage

Describe how to install your plugin, such as:

npm install eleventy-plugin-tailwind-components

Then, include it in your .eleventy.js config file:

const tailwind = require("eleventy-plugin-tailwind-components");

module.exports = (eleventyConfig) => {
  eleventyConfig.addPlugin(tailwind);
};

Current templates

Card templates

{% tailwind card <cardtype> dataObject %}
propertyTypeDescription
titlestringA title for the card
descriptionstringa short description to show on the card
urlstringoptional url
imagestringUrl to an image to use in image-based cards
Card typeaccepted datadescription
gradienttitle, description, urlSimple card with gradient border
imagetitle, description, image, urlDark background card with image
borderImagetitle, description, image, urlSimple light background, bordered card

Alert Templates

{% tailwind "alerts" "simple" data %}
propertyTypeDescription
titlestringA title for the card
colorstringA tailwind color (default: sky)
descriptionstringan optional short description to show on the card
urlstringoptional url
Alert typeaccepted datadescription
simpletext, color, description, urltext alert banner

Announcement template

{% tailwind "announcements" "top" data %}
propertyTypeDescription
textstringText for the announcment
colorstringA tailwind color (default: sky)
urlstringoptional url
linkTextstringText for the optional link
Announcement typeaccepted datadescription
toptext, description, url, linkTextAnnouncement banner top of page
bottomtext, description, url, linkTextAnnouncement banner sticky bottom of page
floatingBottomtext, description, url, linkTextAnnouncement banner sticky bottom of page (not full width)

Credits

Components from HyperUI by Mark Mead