# @askrjs/ui/form

> Published API exports for @askrjs/ui/form.

Source: [https://askrjs.com/docs/reference/api/ui/form](https://askrjs.com/docs/reference/api/ui/form)

Status: stable. Packages: @askrjs/ui/form.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 3 exports from the declarations shipped by @askrjs/ui.

### `Form`

```ts
Form: { (props: FormProps): JSX.Element; (props: FormAsChildProps): JSX.Element; }
```

Renders a part of `form`.

Supports polymorphic rendering via `asChild`.

### `FormAsChildProps`

```ts
FormAsChildProps: Omit<JSX.IntrinsicElements['form'], 'children' | 'ref'> & FormOwnProps & {
  asChild: true;
  children: JSX.Element;
  ref?: import('@askrjs/askr/foundations/utilities').Ref<Element>;
}
```

`asChild` keeps the form host supplied by the consumer, while retaining the
native form attribute contract (method, action, target, encoding, etc.).

- `asChild`: asChild: true;

- `children`: children: JSX.Element;

- `ref`: ref?: Ref<Element>;

### `FormProps`

```ts
FormProps: BoxProps<'form', HTMLFormElement> & FormOwnProps
```

Props for Form.

- `asChild`: asChild?: false | undefined;

- `children`: children?: unknown;

- `ref`: ref?: Ref<HTMLFormElement>;

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/ui/input/index.md) | [Next](https://askrjs.com/docs/reference/api/ui/label/index.md)
