# List

The `List` component renders an ordered or unordered list based with the provided items.

### Ordered & Unordered

```javascript
import { List } from 'components/lib';

function MyComponent({ ...props }){

  return (
    <div>
      <List items={['Item 1', 'Item 2', 'Item 3']} ordered/>
    </div>
  );
}

```

### Props

| Props     | Description          | Required | Value            |
| --------- | -------------------- | -------- | ---------------- |
| className | custom style         | optional | SCSS or Tailwind |
| items     | list of items        | required | array of strings |
| ordered   | show an ordered list | optional | boolean          |

### Notes

* The `List` component uses the `cn` function from `'components/lib'` for class name handling.
* The `className` prop allows for custom styling to be applied.
* The `items` prop specifies the list of items to be displayed.
* The `ordered` prop determines whether the list is ordered (`<ol>`) or unordered (`<ul>`).


---

# 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://docs.usegravity.app/gravity-web/components/list.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.
