Skip to main content
Home

@buen/type@1.1.1
Built and signed on GitHub Actions

DEPRECATED, ALL LATEST PUBLISHES MOVED TO https://jsr.io/@muybuen/type

This package works with Node.js, BrowsersIt is unknown whether this package works with Cloudflare Workers, Deno, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
11 months ago (1.1.1)

A module that converts an object of headlinea and text defs into Tailwind CSS utilities.

Examples

  1. Define custom styles, using either the default keys or by expanding upon them

// type-config.ts

const customHeadlines = {
  'display-xl': {
    fontFamily: "'Inter', 'sans-serif'",
    fontWeight: 'bold',
    clamp: [4.5, 9],
    letterSpacing: '-0.1em',
    lineHeight: 1,
    textTransform: 'uppercase',
  },
  // ...
}

const customTexts = {
  'body': {
    fontFamily: "'Inter', 'sans-serif'",
    fontWeight: 'normal',
    fontSize: '1.1rem'
    letterSpacing: '0em',
    lineHeight: 1.5,
    textTransform: 'none',
  },
  // ...
}
  1. Add the custom styles to the plugin
// tailwind.config.ts
import { buenTypeTailwind } from "@buen/type";
import { customHeadlines, customTexts } from "./type-config";

function typePlugin({ addUtilities }) {
  buenTypeTailwind({ addUtilities }, {
    customHeadlines,
    customTexts
  });
};

module.exports = {
  //  ...
  plugins: [
    typePlugin
  ]
};
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@buen/type

Import symbol

import * as type from "@buen/type";
or

Import directly with a jsr specifier

import * as type from "jsr:@buen/type";

Add Package

pnpm i jsr:@buen/type
or (using pnpm 10.8 or older)
pnpm dlx jsr add @buen/type

Import symbol

import * as type from "@buen/type";

Add Package

yarn add jsr:@buen/type
or (using Yarn 4.8 or older)
yarn dlx jsr add @buen/type

Import symbol

import * as type from "@buen/type";

Add Package

vlt install jsr:@buen/type

Import symbol

import * as type from "@buen/type";

Add Package

npx jsr add @buen/type

Import symbol

import * as type from "@buen/type";

Add Package

bunx jsr add @buen/type

Import symbol

import * as type from "@buen/type";