s3-kennisbank

View the Project on GitHub HU-SD-S3/s3-kennisbank

data-form

Description

The data-form component provides a form to submit new user data or edit existing user data. It includes input fields for the user's name, telephone number, and email, as well as a submit button that changes its text based on whether the form is in "add" or "edit" mode. When the form is submitted, it dispatches custom events to notify the parent component of the action taken.

CSS Variables

Note: The component uses these variables via var(--name, <fallback>), so they will work whether a global stylesheet is present or not.

Attributes

Data shape / example

Example User object:

{
  "id": 1,
  "name": "Alice Example",
  "email": "alice@example.com",
  "phone": "+15551234567"
}

Note: id may be omitted when creating a new user.

Events

(Custom)Events listened to

none

(Custom)Events dispatching

Required Services

none

Slots

none


<- back to README