Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twind/preset-typography

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twind/preset-typography

Typography preset for twind

  • 1.0.0-next.38
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by13.69%
Maintainers
1
Weekly downloads
 
Created
Source

@twind/preset-typography MIT License Latest Release Github


READ THIS FIRST!

Twind v1 is still in beta. Expect bugs!


A plugin that provides a set of prose classes you can use to add beautiful typographic defaults to any vanilla HTML you don't control, like HTML rendered from Markdown, or pulled from a CMS.

Based on @tailwindcss/typography.

Installation

Install from npm:

npm install twind@next @twind/preset-typography@next

Installation

with twind

import { setup } from 'twind'
import presetTypography from '@twind/preset-typography'

setup({
  presets: [presetTypography(/* options */)],
  /* config */
})
Usage with a script tag
<head>
  <script
    src="https://cdn.jsdelivr.net/combine/npm/twind@next,npm/@twind/preset-typography@next"
    crossorigin
  ></script>
  <script>
    twind.setup({
      presets: [twind.presetTypography(/* options */)],
      /* config */
    })
  </script>
</head>

with Twind CDN — a drop-in replacement for Tailwind CSS Play CDN

<head>
  <script
    src="https://cdn.jsdelivr.net/combine/npm/@twind/cdn@next,npm/@twind/preset-typography@next"
    crossorigin
  ></script>
  <script>
    twind.setup({
      presets: [twind.presetTypography(/* options */)],
      /* config */
    })
  </script>
</head>

Usage

TBD

Most features of the Tailwind CSSS › typography-plugin are implemented in the same way.

Differences

  • Adding custom color themes: every color from theme.colors is available via prose-<color>; the default color gray can be changed via presetTypography({ defaultColor: '...'})
  • Customizing the CSS: can be done using presetTypography({ extend: { /* CSS object */ } })

Keywords

FAQs

Package last updated on 05 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc