# Tailwind API

Every export of kitr/tailwind, with its signature.

Every export of `kitr/tailwind`, `kitr/tailwind/vite`, read from the published type definitions. The [guide](/packages/tailwind) shows them in use.

## kitr/tailwind

Re-exports `clsx`, `tailwind-merge` unchanged, plus the following.

### cn

```ts
function cn(...inputs: ClassValue[]): string;
```

Join class names and drop the Tailwind classes a later one overrides: clsx plus tailwind-merge,
as in shadcn. Put a component's `className` prop last so callers can override its defaults.

### defineConfig

```ts
const defineConfig: <const C extends TailwindConfig>(config: C) => C;
```

Types `config/tailwind.ts` against `TailwindConfig` and returns the object unchanged.

### TailwindConfig

```ts
interface TailwindConfig {
  /** Entry stylesheet relative to the project root. Default `app/styles/app.css`. */
  entry?: string;
  /** Use kitr's preset (`@kitr/tailwind/preset.css`). Default true. */
  preset?: boolean;
}
```

Options of `config/tailwind.ts`. They record how the project's stylesheet is set up; the build reads the CSS itself.

## kitr/tailwind/vite

### kitrTailwind

```ts
function kitrTailwind(): Plugin[];
```

Tailwind v4 for kitr apps. Exactly `@tailwindcss/vite`, exposed here so
`kitr add tailwind` has one import to write and one version to manage.

<!-- GENERATED by scripts/api-docs.mjs from the type definitions. Do not edit. -->
