Skip to content

Plugin Typography API reference

Source information
  • Package: @pikacss/plugin-typography
  • Generated from the exported surface and JSDoc in packages/plugin-typography/src/index.ts.
  • Source files: packages/plugin-typography/src/index.ts

Package summary

Prose typography shortcuts

Use Typography plugin when you need conceptual usage guidance instead of exact symbol lookup.

Functions

typography()

Creates the PikaCSS typography engine plugin.

Returns: EnginePlugin - An engine plugin that registers prose CSS variables and shortcut utilities (prose, prose-sm, prose-lg, prose-xl, prose-2xl).

Remarks:

The plugin reads the typography key from the engine config, merges user-provided variable overrides with the defaults, and registers a full set of typography shortcuts covering paragraphs, links, headings, lists, code, tables, and more.

ts
import { typography } from '@pikacss/plugin-typography'

export default defineEngineConfig({
  plugins: [typography()],
  typography: {
    variables: { '--pk-prose-color-links': '#3b82f6' },
  },
})


Types

TypographyPluginOptions

Configuration options for the typography plugin.

PropertyTypeDescriptionDefault
variables?Partial<typeof typographyVariables>Partial overrides for the default prose CSS custom properties.{}

Remarks:

Pass this object under the typography key in your engine config to customize prose color variables.

ts
const config = {
  typography: {
    variables: { '--pk-prose-color-links': '#3b82f6' },
  },
}


Module augmentations

EngineConfig (@pikacss/core)

PropertyTypeDescriptionDefault
typography?TypographyPluginOptionsTypography plugin options forwarded from the engine config.undefined