# components/Checklist (zidane-ui)

Import: `import { … } from 'zidane-ui'`. Source: [ui/src/components/Checklist.tsx](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx).

## Components

### `Checklist`

Component.

Renders the groups as one grid of checks, or as cards.

```ts
function Checklist(props: ChecklistProps): Element
```

**Parameters**

- `props` (`ChecklistProps`): [`ChecklistProps`](https://zidane.si/docs/reference/ui-components-checklist.md#ChecklistProps).

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the root element.
- `groupLabel?` (`string`): The header over the group names in the grid, such as "Package".
- `groups` (`readonly ChecklistGroup[]`): The groups, in order.
- `style?` (`CSSProperties`): Inline styles on the root element.
- `summary?` (`boolean`, default `true`): The count done, drawn large under the title. Off when a `Progress` above already says it.
- `title?` (`ReactNode`): A title above the checks.

Source: [ui/src/components/Checklist.tsx:109](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx#L109)

## Functions

### `checklistIsGrid`

Function.

Whether every group has the same check labels in the same order, so the
checks draw as one grid.

```ts
function checklistIsGrid(groups: readonly ChecklistGroup[]): boolean
```

**Parameters**

- `groups` (`readonly ChecklistGroup[]`): The groups.

**Returns** `boolean`

Source: [ui/src/components/Checklist.tsx:63](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx#L63)

## Interfaces

### `ChecklistGroup`

Interface.

One group of checks: a package, a host, a step.

```ts
interface ChecklistGroup
```

**Properties**

- `items` (`readonly ChecklistItem[]`): The group's checks, in order.
- `label` (`string`): The group's name.

Source: [ui/src/components/Checklist.tsx:25](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx#L25)

### `ChecklistItem`

Interface.

One check of a [`ChecklistGroup`](https://zidane.si/docs/reference/ui-components-checklist.md#ChecklistGroup).

```ts
interface ChecklistItem
```

**Properties**

- `label` (`string`): What the check is.
- `note?` (`string`): A short line after the label.
- `status` (`ChecklistStatus`): How the check went.

Source: [ui/src/components/Checklist.tsx:15](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx#L15)

### `ChecklistProps`

Interface.

Props for [`Checklist`](https://zidane.si/docs/reference/ui-components-checklist.md#Checklist).

```ts
interface ChecklistProps
```

**Properties**

- `className?` (`string`): Extra classes on the root element.
- `groupLabel?` (`string`): The header over the group names in the grid, such as "Package".
- `groups` (`readonly ChecklistGroup[]`): The groups, in order.
- `style?` (`CSSProperties`): Inline styles on the root element.
- `summary?` (`boolean`, default `true`): The count done, drawn large under the title. Off when a `Progress` above already says it.
- `title?` (`ReactNode`): A title above the checks.

Source: [ui/src/components/Checklist.tsx:33](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx#L33)

## Types

### `ChecklistStatus`

Type.

How one check went.

```ts
type ChecklistStatus = 'done' | 'failed' | 'pending'
```

Source: [ui/src/components/Checklist.tsx:12](https://github.com/Tahul/zidane/blob/main/ui/src/components/Checklist.tsx#L12)
