Skip to content
Türkçe
All snippets

Validated email field

A form input with a validator, a focus ring and an error: border.

  • WFormInput
preview
form_input_validation.dart
WFormInput(
  label: 'Email Address',
  placeholder: '[email protected]',
  className: '''
    p-3 border border-gray-300 rounded-lg
    focus:ring-2 focus:ring-blue-500 error:border-red-500
  ''',
  validator: (value) {
    if (value == null || value.isEmpty) return 'Email is required';
    if (!value.contains('@')) return 'Invalid email address';
    return null;
  },
)
  • Button variants

    One recipe with two intents and two sizes, resolved from a map of classNames.

    • WindRecipe
  • Disabled button

    A button that fades and greys out through disabled: utilities.

    • WDiv
    • WText
    • WButton
  • Hover transition

    A primary button that darkens and lifts its shadow over 200 milliseconds.

    • WAnchor
    • WDiv
    • WText