> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# CSS Modules

Component styles from a `.module.css` file, with class names hashed at build time so they can't clash with other styles.


## What it shows

- **Importing a `.module.css` file** — `import styles from './demo.module.css'` gives you an object that maps each class name to its hashed name. See [CSS Modules](/guide/css-modules.md).
- **`[class]="styles['card']"`** — applies a hashed class in the template. The component exposes `styles` as a field so the template can read it.
- **A type declaration** — `src/css-modules.d.ts` declares `*.module.css` imports, so TypeScript accepts them.
- **The hashed names on screen** — the last card prints what `card` and `title` compile to.

## Related

- [CSS on Lynx](/guide/styling/index.md)
- [Tailwind CSS](/guide/tailwindcss.md)
