Skip to main content

ontario-fieldset

Use the fieldset element to group related form elements.

Usage guidance

Please refer to the Ontario Design System for current documentation guidance for fieldsets.

Configuration

Once the component package has been installed (see Ontario Design System Component Library for installation instructions), the fieldset component can be added directly into the project's code, and can be customized by updating the properties outlined here. Please see the examples below for how to configure the component.

Examples

Example of a fieldset component.

<ontario-fieldset
legend="What is your delivery address?"
level-size="heading"
>
<!-- Other form web components can be added as children to group related form elements together -->
<ontario-textarea ...></ontario-textarea>
<ontario-radio-buttons ...></ontario-radio-buttons>
</ontario-aside>
...

Properties

PropertyAttributeDescriptionTypeDefault
legendlegendThe text value used for the legend of the fieldset.stringundefined
legendSizelegend-sizeThe size of the fieldset legend. If no prop is passed, it will be default."default" | "heading" | "large"'default'

Built with StencilJS