Field sizing
import { ApiTable } from "@/components/api-table.tsx"; import { Example } from "@/components/example.tsx"; import { Figure } from "@/components/figure.tsx"; import { ResponsiveDesign } from "@/components/content.tsx";
export const title = "field-sizing"; export const description = "Utilities for controlling the sizing of form controls.";
Examples¶
Sizing based on content¶
Use the field-sizing-content utility to allow a form control to adjust its size based on the content:
<!-- [!code classes:field-sizing-content] -->
<textarea class="field-sizing-content ..." rows="2">
Latex Salesman, Vanderlay Industries
</textarea>
Using a fixed size¶
Use the field-sizing-fixed utility to make a form control use a fixed size:
<!-- [!code classes:field-sizing-fixed] -->
<textarea class="field-sizing-fixed w-80 ..." rows="2">
Latex Salesman, Vanderlay Industries
</textarea>