File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
core/src/components/checkbox Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,11 @@ export class Checkbox implements ComponentInterface {
9898 */
9999 @Prop ( ) alignment ?: 'start' | 'center' ;
100100
101+ /**
102+ * If `true`, the user must fill in a value before submitting a form.
103+ */
104+ @Prop ( ) required = false ;
105+
101106 /**
102107 * Emitted when the checked property has changed as a result of a user action such as a click.
103108 *
@@ -182,6 +187,7 @@ export class Checkbox implements ComponentInterface {
182187 name,
183188 value,
184189 alignment,
190+ required
185191 } = this ;
186192 const mode = getIonMode ( this ) ;
187193 const path = getSVGPath ( mode , indeterminate ) ;
@@ -218,6 +224,7 @@ export class Checkbox implements ComponentInterface {
218224 onFocus = { ( ) => this . onFocus ( ) }
219225 onBlur = { ( ) => this . onBlur ( ) }
220226 ref = { ( focusEl ) => ( this . focusEl = focusEl ) }
227+ required = { required }
221228 { ...inheritedAttributes }
222229 />
223230 < div
You can’t perform that action at this time.
0 commit comments