<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@csstools/css-parser-algorithms](./css-parser-algorithms.md) &gt; [parseCommaSeparatedListOfComponentValues](./css-parser-algorithms.parsecommaseparatedlistofcomponentvalues.md)

## parseCommaSeparatedListOfComponentValues() function

Parse a comma-separated list of component values.

**Signature:**

```typescript
export declare function parseCommaSeparatedListOfComponentValues(tokens: Array<CSSToken>, options?: {
    onParseError?: (error: ParseError) => void;
}): Array<Array<ComponentValue>>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

tokens


</td><td>

Array&lt;CSSToken&gt;


</td><td>


</td></tr>
<tr><td>

options


</td><td>

{ onParseError?: (error: ParseError) =&gt; void; }


</td><td>

_(Optional)_


</td></tr>
</tbody></table>

**Returns:**

Array&lt;Array&lt;[ComponentValue](./css-parser-algorithms.componentvalue.md)<!-- -->&gt;&gt;

## Example


```js
import { tokenize } from '@csstools/css-tokenizer';
import { parseCommaSeparatedListOfComponentValues } from '@csstools/css-parser-algorithms';

parseCommaSeparatedListOfComponentValues(tokenize({ css: `20deg, 50%, 30%` }));
```

