# Configuring Modules

Every module in Pollen can be customised, overwritten, and extended. A *module* is a collection of CSS variables with the same prefix, eg: `scale` (see [Typography](/modules/typography.md)), `size` (see [Layout](/modules/layout.md)), etc.

### Enabling and disabling&#x20;

Enable and disable whole module by passing `true` or `false` to the module in your config. All modules are enabled by default, set any you don't plan on using to `false` to further save on bundle size.

{% code title="pollen.config.js" %}

```javascript
module.exports = {
  modules: {
    scale: false,
    width: false,
    color: true
  }
}
```

{% endcode %}

### Overwriting

To overwrite a module, provide an object with all the values you want to use to the module in your config.

{% code title="pollen.config.js" %}

```javascript
module.exports = {
  modules: {
    scale: { /* custom type scale */ },
    letter: { /* custom letter spacing scale * }
  }
}
```

{% endcode %}

### Extending

Often you'll want to just add or tweak a few values from Pollen's defaults instead of disabling or overwriting outright.&#x20;

To do this Pollen provides all of its defaults as an argument to a configuration *function* rather than a plain object. Spread the appropriate key into a new object on the module to extend or overwrite Pollen's defaults.

{% code title="pollen.config.js" %}

```javascript
module.exports = (pollen) => ({
  modules: {
    scale: { ...pollen.scale, '000': '0.6875rem' },
    letter: {...pollen.letter, '2xl': '0.1em' }
   } 
});
```

{% endcode %}

These defaults are also provided in the `defineConfig` typescript helper

```javascript
const { defineConfig } = require('pollen-css/utils');

module.exports = defineConfig(pollen => ({
  modules: {
    scale: { ...pollen.scale, '000': '0.6875rem' },
    letter: {...pollen.letter, '2xl': '0.1em' }
   } 
  })
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pollen.style/basics/configuration/configuring-modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
