Skip to content

Form - Web Component

...

Browser support

Parameters

The Web component uses a <z-form> tag.

The parametrization of the component can be done with the following custom HTML params:

NameTypeDescription
configstring

The main parameter has two components following the pattern: <shape><?:size>.

  • shape: Establishes the styling of the input. Default value is line . Possible values are: shaped or line. ,
  • size: (optional) defines de size of the input. The default value is m, being omitted from the param. The possible values are: m or l.

Playground

Customization

HTML Examples

Imports
html
<link rel="stylesheet" href="/0.3.7/@zurich/web-components/styles.css" />
<script type="module" src="/0.3.7/@zurich/web-components/form.js"></script>
<script type="module" src="/0.3.7/@zurich/web-components/text-input.js"></script>
Code
html
<z-form>
  <z-text-input label="User name" placeholder="User name" value=""></z-text-input>
</z-form>