@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
34 lines (33 loc) • 1.1 kB
TypeScript
import { type ReactNode } from 'react';
import type { HeadingLevel } from '../internal/types.js';
export interface FormAsideProps {
title: ReactNode;
/** The "why" — prose beside the fields. */
description?: ReactNode;
/** Default 3. */
headingLevel?: HeadingLevel;
/** Default `'4/8'`. */
ratio?: '4/8' | '5/7' | '1/3';
/** Stack the columns below this breakpoint. Default `'md'`. */
collapseBelow?: 'sm' | 'md' | 'lg';
children: ReactNode;
}
/**
* The settings layout. A heading and its reason in a column beside the fields.
*
* @remarks
* `FormAside` puts a section's heading and a sentence about why it matters in a column on the
* left, and the fields on the right. Stack several with dividers for a settings page. Below
* `collapseBelow` the column stacks above the fields.
*
* @example In a schema
* ```json
* {
* "layout": "aside",
* "title": "Profile",
* "description": "Shown to people you share routes with.",
* "children": []
* }
* ```
*/
export declare function FormAside(props: FormAsideProps): import("react").JSX.Element;