diff --git a/canon-docs/src/app/(docs)/components/field/page.mdx b/canon-docs/src/app/(docs)/components/field/page.mdx new file mode 100644 index 0000000000..1526ce8c9f --- /dev/null +++ b/canon-docs/src/app/(docs)/components/field/page.mdx @@ -0,0 +1,99 @@ +import { PropsTable } from '@/components/PropsTable'; +import { Snippet } from '@/components/Snippet'; +import { Tabs } from '@/components/Tabs'; +import { CodeBlock } from '@/components/CodeBlock'; +import { FieldSnippet } from '@/snippets/stories-snippets'; +import { BaseUI } from '@/components/HeadlessBanners/BaseUI'; +import { + fieldRootPropDefs, + fieldLabelPropDefs, + fieldDescriptionPropDefs, + fieldErrorPropDefs, +} from './props'; + +# Field + +A wrapper around `Input` or `Select` component to add label, description and error messages.. + +} + code={``} +/> + + + + Usage + Theming + + + + Name + + Visible on your profile + +`} + /> + + + We recommend starting with our [global tokens](/theme/theming) to customize the library and align it with + your brand. For additional flexibility, you can use the provided class names for each element listed below. + + + + +`} + /> + + + +## API reference + + + +### Field.Root + +Groups all parts of the field. Renders a `
` element. + + + +### Field.Label + +An accessible label that is automatically associated with the field control. Renders a `