src/docs/field-sizing.mdx
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.";
<ApiTable rows={[ ["field-sizing-fixed", "field-sizing: fixed;"], ["field-sizing-content", "field-sizing: 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>
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>
<ResponsiveDesign element="input" property="field-sizing" defaultClass="field-sizing-content" featuredClass="field-sizing-fixed" />