Tailwind CSS

Learn how to use the design tokens with Tailwind CSS.

Installation

Install the package with your prefered package manager:

npm i @morpheme/design-tokens
yarn add @morpheme/design-tokens
pnpm add @morpheme/design-tokens

Usage

Import and use the tailwind config like so:

tailwind.config.js
const theme = require('@morpheme/design-tokens/js/tailwind');
/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: theme,
  },
};

Example

Dashboard

Welcome back, John Doe!

<template> <h1 class="text-display-xl font-semibold"> Dashboard </h1> <p class="text-lg text-gray-500"> Welcome back, John Doe! </p> </template>

References