2.2.1 • Published 11 months ago

@forter/multistep-form v2.2.1

Weekly downloads
32
License
Apache-2.0
Repository
github
Last release
11 months ago

fc-multistep-form

Multi-step form component

Usage

<fc-multistep-form>
   <fieldset id="users-step">
     <h2>Step 1 - Choose Users</h2>

     <section id="users-checks">
       <h2>Users</h2>
       <fc-checkbox>Assaf</fc-checkbox>
       <fc-checkbox>Shalom (Yafyuf)</fc-checkbox>
       <fc-checkbox>Daniel</fc-checkbox>
       <fc-checkbox>David</fc-checkbox>
       <fc-checkbox>Gilad</fc-checkbox>
       <fc-checkbox>Goldi</fc-checkbox>
       <fc-checkbox>Harel</fc-checkbox>
       <fc-checkbox>Ori</fc-checkbox>
     </section>

     <section id="users-filter">
       <h2>Language</h2>
       <fc-checkbox checked data-lang="en">English</fc-checkbox>
       <fc-checkbox checked data-lang="he">Hebrew</fc-checkbox>
       <fc-checkbox checked data-lang="hp">Hipster</fc-checkbox>
     </section>
   </fieldset>

   <fieldset id="message-step">
     <h2>Step 2 - Choose a Message</h2>

     <fc-textarea label="Message"></fc-textarea>

     <fc-dropdown label="Mood" trigger-label="Mood">
       <fc-dropdown-item>Chill</fc-dropdown-item>
       <fc-dropdown-item>Kill</fc-dropdown-item>
       <fc-dropdown-item>Thrill</fc-dropdown-item>
     </fc-dropdown>

     <fc-radio-group name="urgency">
       <fc-radio label="Urgent" value="urgent"></fc-radio>
       <fc-radio label="Leisurely" value="leisurely"></fc-radio>
     </fc-radio-group>
   </fieldset>

   <fieldset>
     <h2>Step 3 - Confirm</h2>
     <p>You are about to send the following message:</p>
     <dl>

       <dt>Recipients:</dt>
       <dd><output data-value="users"></output></dd>

       <dt>Message:</dt>
       <dd><output data-value="message"></output></dd>

       <dt>Urgency:</dt>
       <dd><output data-value="urgency"></output></dd>

       <dt>Mood:</dt>
       <dd><output data-value="mood"></output></dd>

     </dl>
   </fieldset>

</fc-multistep-form>

Properties

PropertyAttributeTypeDefaultDescription
autoFocusauto-focusbooleanfalseWhether the form should auto focus
backLabelback-labelstring"Back"The label for the 'back' button
cancelLabelcancel-labelstring"Cancel"The label for the 'cancel' button
disableddisabledbooleanfalseWhether the element is disabled
formany
intentintentstring"apply"The intent for the 'submit' button
nextLabelnext-labelstring"Next"The label for the 'next' button
stepstepnumber
submitButtonany
submitHiddenany
submitLabelsubmit-labelstring"Submit"The label for the 'submit' button

Events

EventDescription
cancelwhen the user cancels
next-stepwhen the step decrements
previous-stepwhen the step increments
resetwhen the user resets
step-changedwhenever the step changes
submitwhen the user submits

Slots

NameDescription
content
headerform header for all steps

CSS Custom Properties

PropertyDescription
--fc-multistep-form-actions-paddingdefault: 18px
--fc-multistep-form-counter-sizedefault: 23px
--fc-multistep-form-paddingdefault: 23px 0
--rule-colordefault: var(--fc-gray-100)
--step-background-colordefault: var(--cyan-5)
--step-border-background-colordefault: var(--fc-multistep-form-background-color, inherit)
--step-colordefault: var(---fc-gray-600)
--step-inner-border-colordefault: var(--fc-gray-600)
--step-outer-border-colordefault: var(--fc-gray-100)
2.2.1

11 months ago

2.2.0

2 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago