Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
import { Field } from '@base-ui/react/field'
import * as React from 'react'
import { cn } from '../lib/utils'
/**
* Label component backed by Base UI's Field.Label.
*
* Wraps each label in a Field.Root so it can be used standalone
* without requiring consumers to manually add Field.Root parents.
*/
function Label({ className, children, ...props }: React.ComponentProps<'label'>) {
return (
<Field.Root>
<Field.Label
data-slot="label"
className={cn(
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
className,
)}
{...props}
>
{children}
</Field.Label>
</Field.Root>
)
}
export { Label }