# AutoTypeTable
> A props table generated from a component's parameters, defaults and XML doc comments.
Source: https://shelldocs.shellui.dev/docs/components/auto-type-table
`AutoTypeTable` builds a props table for a registered component by reflecting on it. You name the component; the table lists every `[Parameter]` with its type, default and description. It replaces copying each prop into a `TypeRow` by hand, and it can't drift from the code.
## Basic use
```markdown
```
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `Columns` | `int` | `2` | Number of grid columns on desktop. |
| `Count` | `int` | `4` | How many packages to list, in dependency order. |
That table comes from this component:
```razor
@code {
/// Number of grid columns on desktop.
[Parameter] public int Columns { get; set; } = 2;
/// How many packages to list, in dependency order.
[Parameter] public int Count { get; set; } = 4;
}
```
## Where each column comes from
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `Prop` | `name` | | Every public property marked with the Parameter attribute. EditorRequired adds the Required chip. |
| `Type` | `C# type` | | Written compactly, with nullability and generic arguments. |
| `Default` | `value` | | From a DefaultValue attribute if present, otherwise read from a new instance of the component. Empty strings and render fragments show as a dash. |
| `Description` | `text` | | The property's XML doc summary. |
## Turning on descriptions
Descriptions are read from the XML documentation file next to the assembly. Enable it in the project that owns the components:
```xml
true
$(NoWarn);CS1591
```
`CS1591` is the "missing XML comment" warning. Suppress it unless you want a warning for every undocumented member.
Without an XML file the table still renders, with a dash in the description column. A component library from NuGet shows descriptions when its package ships the `.xml` file.
## Generic components
A generic component lists its type parameters first, marked required, then its props. Defaults are read from an instance closed over `object` when the constraints allow it.
## Unknown component
If `Component` doesn't match a registered type, the table shows a single row saying so.
## AutoTypeTable or TypeTable
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `AutoTypeTable` | `generated` | | Component props. Always matches the code. |
| `TypeTable` | `hand-written` | | Anything that isn't a component: CLI flags, options, tokens. Also when you want wording that differs from the doc comments. |
## Props
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `Component` (required) | `string` | `—` | Tag name of a registered component. |
## See also
- [TypeTable](https://shelldocs.shellui.dev/docs/components/type-table.md): The hand-written table.
- [DemoPreview](https://shelldocs.shellui.dev/docs/components/demo-preview.md): Show the component next to its table.