Discover Packages
github.com/axzilla/templui
pkg
utils
package
Version:
v0.25.0
Opens a new window with list of versions in this module.
Published: Dec 12, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Alpine returns script tags for Alpine.js
mergeAttributes merges multiple Attributes into one
RandomID returns a random ID string
Example: "id-123456"
TwIf returns a class if a condition is true, otherwise an empty string
Example: "bg-red-500", true → "bg-red-500", false → ""
TwMerge combines Tailwind classes and handles conflicts.
Later classes override earlier ones with the same base.
Example: "bg-red-500 hover:bg-blue-500", "bg-green-500" → "hover:bg-blue-500 bg-green-500"
Source Files
¶
Click to show internal directories.
Click to hide internal directories.