# better-tailwindcss/no-unknown-classes
Disallow unknown classes in Tailwind CSS class strings. Unknown classes are classes that are not defined in your Tailwind CSS config file and therefore not recognized by Tailwind CSS.
## Options
### `ignore`
List of List of regex patterns for classes that should not report an error.
**Type**: `string[]`
**Default**: `[]`
### `detectComponentClasses`
Tailwind CSS v4 allows you to define custom [component classes](https://tailwindcss.com/docs/adding-custom-styles#adding-component-classes) like `card`, `btn`, `badge` etc.
If you want to create such classes, you can set this option to `true` to allow the rule to detect those classes and not report them as unknown classes. This can also be configured via the [`settings` object](../settings/settings.md).
**Type**: `boolean`
**Default**: `false`
Common options
These options are common to all rules and can also be set globally via the [`settings` object](../settings/settings.md).
### `selectors`
Flat list of selectors that determines where Tailwind class strings are linted.
**Type**: Array of [Selectors](../configuration/advanced.md#selectors)
**Default**: See [defaults API](../api/defaults.md)
### `entryPoint`
The path to the entry file of the css based tailwind config (eg: `src/global.css`).
If not specified, the plugin will fall back to the default configuration.
**Type**: `string`
**Default**: `undefined`
### `tailwindConfig`
The path to the `tailwind.config.js` file. If not specified, the plugin will try to find it automatically or falls back to the default configuration.
This can also be set globally via the [`settings` object](../settings/settings.md#tailwindConfig).
For Tailwind CSS v4 and the css based config, use the [`entryPoint`](#entrypoint) option instead.
**Type**: `string`
**Default**: `undefined`
### `tsconfig`
The path to the `tsconfig.json` file. If not specified, the plugin will try to find it automatically.
This can also be set globally via the [`settings` object](../settings/settings.md#tsconfig).
The tsconfig is used to resolve tsconfig [`path`](https://www.typescriptlang.org/tsconfig/#paths) aliases.
**Type**: `string`
**Default**: `undefined`
## Examples
```tsx
// ❌ BAD: unknown class