src/docs/text-transform.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 = "text-transform"; export const description = "Utilities for controlling the capitalization of text.";
<ApiTable rows={[ ["uppercase", "text-transform: uppercase;"], ["lowercase", "text-transform: lowercase;"], ["capitalize", "text-transform: capitalize;"], ["normal-case", "text-transform: none;"], ]} />
Use the uppercase utility to uppercase the text of an element:
<!-- [!code classes:uppercase] -->
<p class="uppercase">The quick brown fox ...</p>
Use the lowercase utility to lowercase the text of an element:
<!-- [!code classes:lowercase] -->
<p class="lowercase">The quick brown fox ...</p>
Use the capitalize utility to capitalize text of an element:
<!-- [!code classes:capitalize] -->
<p class="capitalize">The quick brown fox ...</p>
Use the normal-case utility to preserve the original text casing of an element—typically used to reset capitalization at different breakpoints:
<!-- [!code classes:normal-case] -->
<p class="normal-case">The quick brown fox ...</p>