LogoPixi’VN

Tailwind CSS

How to add Tailwind CSS to a Pixi’VN project, recommended plugins, and examples of using to style dialogue and UI.

What is Tailwind CSS? Tailwind CSS is a utility-first CSS framework for rapidly building custom designs. It is a low-level framework that provides a set of utility classes that can be used to build custom designs without having to leave the HTML. You can get more information on how install it here.

템플릿

In all templates, the Tailwind CSS is already installed and configured.

ink

이 메서드는 ink 문법과 함께 사용할 수 있습니다. See more here.

You can learn more on the Tailwind CSS website.

There are various Tailwind CSS plugins available. Here is a list of some of them:

It is recommended to use Tailwind CSS in your Pixi’VN project to add styling or animations to your dialogue text. Here is an example using the tailwindcss-motion plugin:

content/labels/start.label.ts
import { narration, newLabel } from "@drincs/pixi-vn";

const startLabel = newLabel("start", [
    async () => {
        narration.dialogue = `<span className="inline-block motion-translate-y-loop-25">Hello</span>, welcome to the game!`;
    },
]);
export default startLabel;