tx-styling

- Editing components that use the tx prop or tx template literals.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tx-styling" with this command: npx skills add landfolk/tx/landfolk-tx-tx-styling

tx styling

When to use

  • Editing components that use the tx prop or tx template literals.

  • Integrating @landfolk/tx into a React/Next.js app.

  • Debugging grouping, Tailwind extraction, or linting around tx .

Core rules

  • Prefer tx over className for Tailwind classes.

  • Use arrays for conditional styles; avoid string concatenation.

  • Use grouping syntax like hover:(bg-blue-500 text-white) .

  • Do not forward tx props; only forward className .

  • For styleable components, merge className into tx .

Tooling overview

  • SWC plugin rewrites tx to className at compile time.

  • Tailwind transformer expands grouped classes for JIT extraction.

  • ESLint rule sorts and validates classes.

Grouping syntax

Example:

<div tx="hover:(bg-blue-500 text-white)" />

Compiles to className="hover:bg-blue-500 hover:text-white" . Groups can be nested.

SWC transform

  • tx="..." becomes className="..." .

  • Arrays like tx={[cond && tx ...]} become joined className arrays.

  • Tagged tx templates expand at compile time.

  • In dev, class strings can be wrapped with a conflict checker if registered.

Register the dev-only conflict checker once:

import '@landfolk/tx/checkConflicts'

Tailwind transformer

The transformer scans tx attributes and template literals to expand grouped syntax into full class lists so Tailwind JIT sees every class.

ESLint rule

@landfolk/tx/optimize-tailwind-classes :

  • Expands grouped syntax and re-compacts in a stable order.

  • Sorts classes using Tailwind's internal order.

  • Normalizes whitespace in arbitrary values.

  • Can validate class names when given a Tailwind config path.

Getting started

See getting-started.md for install, config, and Next.js compatibility.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

test_skill

import json import tkinter as tk from tkinter import messagebox, simpledialog

Archived SourceRecently Updated
General

错敏信息检测

1. 安装https://clawhub.ai/xxxx/sensitive-check-skill 这个技能 2. 调用错敏信息检测技能,传入参数 userKey=xxxx,content=xxxx

Archived SourceRecently Updated
General

neo

Browse websites, read web pages, interact with web apps, call website APIs, and automate web tasks. Use Neo when: user asks to check a website, read a web page, post on social media (Twitter/X), interact with any web app, look up information on a specific site, scrape data from websites, automate browser tasks, or when you need to call any website's API. Keywords: website, web page, browse, URL, http, API, twitter, tweet, post, scrape, web app, open site, check site, read page, social media, online service.

Archived SourceRecently Updated
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated