import{ useFormTheme }from'@nestledjs/forms'const theme =useFormTheme()// theme.input, theme.label, theme.error, etc.
Theme utilities
tailwindTheme
import{ tailwindTheme }from'@nestledjs/forms'
The default Tailwind CSS theme. Applied automatically unless you provide a custom theme.
createCustomTheme
import{ createCustomTheme }from'@nestledjs/forms'const theme =createCustomTheme({ input:'custom-input-classes', label:'custom-label-classes',})// Merges with tailwindTheme — only override what you need
createFinalTheme
import{ createFinalTheme }from'@nestledjs/forms'const theme =createFinalTheme(baseTheme, overrides)// Merges overrides into baseTheme at runtime
themeReference
import{ themeReference }from'@nestledjs/forms'// Object listing all theme property names and descriptions
generateThemeTemplate
import{ generateThemeTemplate }from'@nestledjs/forms'// Returns a theme object with all properties set to empty strings
Types
FormField
importtype{FormField}from'@nestledjs/forms'// Union type of all possible field definitions
FormFieldType
import{FormFieldType}from'@nestledjs/forms'// Enum of all field type identifiers
FormTheme
importtype{FormTheme}from'@nestledjs/forms'// Interface for the complete theme object
FormProps
importtype{FormProps}from'@nestledjs/forms'// Props interface for the Form component
Validation utilities
import{ createFieldValidation,// Create a validation function for a field createFormResolver,// Create a form-level resolver validateGroup,// Validate a specific validation group}from'@nestledjs/forms'
Currency utilities
import{ currencies,// Array of all supported currency configurations formatCurrency,// Format a number as currency string getCurrencySymbol,// Get the symbol for a currency code}from'@nestledjs/forms'
Date/time utilities
import{ formatDate,// Format a date value formatDateTime,// Format a datetime value formatTime,// Format a time value}from'@nestledjs/forms'