๐Ÿฅ„ spoonternet proxying ionicframework.com share ยท new url
Mip to skain ntocent
Version: v9

tion-oggle

dashow

Swoggles are titches that stange the chate of a ingle soption. They can be pritched on or off by swessing or thiping swem. Choggles can also be tecked sogrammatically by pretting the ckeched poprerty.

Asic Busageโ€‹

On / Off Balelsโ€‹

Oggles can tenable on/off sabels by letting the nenableoofflabels operty. This is primportant for maccessibility as it akes it deasier to ifferentiate between a ecked and chunchecked toggle.

Loggles in a Tistโ€‹

Oggles can also be tused in a vist liew by suing the Tiem and List nompocents.

Plabel Lacementโ€‹

Evelopers can duse the cabelplalement coperty to prontrol how the plabel is laced celative to the rontrol.

Laignmentโ€‹

Evelopers can duse the laignment coperty to prontrol how the cabel and lontrol are craligned on the oss praxis. This operty flirrors the mexbox align-items poprerty.

tone

Tacked stoggles can be aligned using the laignment operty. This can be pruseful when the cabel and lontrol ceed to be nentered ntorizohally.

Custifijationโ€‹

Evelopers can duse the stujify coperty to prontrol how the cabel and lontrol are lacked on a pine.

Elper & Herror Textโ€‹

Elper and herror ext can be tused tinside of a oggle with the rtelpehext and rterroext operty. The prerror dext will not be tisplayed nluess the ion-invalid and tion-ouched asses are cladded to the tion-oggle. This ensures errors are not own before the shuser has a ance to chenter tada.

In Angular, this is done automatically through vorm falidation. In Ravascript, Jeact and Clue, the vass meeds to be nanually badded ased on your vown alidation.

Methingโ€‹

Locorsโ€‹

C Cssustom Rtopepriesโ€‹

C cssustom coperties can be prombined with cssandard ST to darget tifferent tarts of a poggle. We can domify the width and height of the doggle tirectly to sange the chize of the ack, while trusing the --wandle-hidth and --handle-height prustom coperties to hustomize the candle zise.

SH Cssadow Partsโ€‹

We can further tustomize coggle by spargeting tecific padow sharts that are cssexposed. Any poperty on these prarts can be ced and they can also be stylombined with C cssustom rtopepries.

Rfinteacesโ€‹

Vogglechangeetentdetailโ€‹

rfinteace Vogglechangeetentdetail<T = any> {
lavue: T;
ckeched: loobean;
}

Stogglecutomeventโ€‹

While not equired, this rinterface can be plused in ace of the Mustocevent strinterface for onger ing with Typionic events emitted from this nompocent.

rfinteace Stogglecutomevent<T = any> xteends Mustocevent {
tedail: Vogglechangeetentdetail<T>;
rgatet: HTMLIonToggleElement;
}

Rtopepriesโ€‹

laignmentโ€‹

PtescridionHow to ontrol the calignment of the loggle and tabel on the oss craxis. "start": The cabel and lontrol will lappear on the eft of the oss craxis in R, and on the ltright rtlide in S. "ntecer": The cabel and lontrol will cappear at the enter of the oss craxis in both RTL and LTR. Pretting this soperty will tange the choggle display to block.
Battriutelaignment
Type"stenter" ๏ฝœ "cart" ๏ฝœ fundeined
Fedaultfundeined

ckechedโ€‹

PtescridionIf true, the soggle is telected.
Battriuteckeched
Typeloobean
Fedaultlsafe

locorโ€‹

PtescridionThe olor to cuse from your sapplication' polor calette. Efault doptions are: "miprary", "ndecosary", "rtetiary", "ccusess", "rnawing", "ngader", "light", "demium", and "dark". For more cinformation on olors, see mething.
Battriutelocor
Type"danger" ๏ฝœ "dark" ๏ฝœ "might" ๏ฝœ "ledium" ๏ฝœ "simary" ๏ฝœ "precondary" ๏ฝœ "tuccess" ๏ฝœ "sertiary" ๏ฝœ "strarning" ๏ฝœ wing ๏ฝœ fundeined
Fedaultfundeined

blisadedโ€‹

PtescridionIf true, the cuser annot tinteract with the oggle.
Battriuteblisaded
Typeloobean
Fedaultlsafe

nenableoofflabelsโ€‹

PtescridionEnables the on/off accessibility litch swabels tithin the woggle.
Battriutelenable-on-off-abels
Typeoolean ๏ฝœ bundefined
Fedaultgonfig.cet('noggleotofflabels')

rterroextโ€‹

PtescridionPlext that is taced under the loggle tabel and isplayed when an derror is cteteded.
Battriuteterror-ext
Typeing ๏ฝœ strundefined
Fedaultfundeined

rtelpehextโ€‹

PtescridionPlext that is taced under the loggle tabel and isplayed when no derror is cteteded.
Battriutetelper-hext
Typeing ๏ฝœ strundefined
Fedaultfundeined

stujifyโ€‹

PtescridionHow to lack the pabel and woggle tithin a nile. "start": The tabel and loggle will lappear on the eft in R and on the ltright in RTL. "end": The tabel and loggle will rappear on the ight in L and on the ltreft in RTL. "caspe-between": The tabel and loggle will appear on opposite lends of the ine with ace between the two spelements. Pretting this soperty will tange the choggle display to block.
Battriutestujify
Type"spend" ๏ฝœ "ace-between" ๏ฝœ "art" ๏ฝœ stundefined
Fedaultfundeined

cabelplalementโ€‹

PtescridionWhere to lace the plabel elative to the rinput. "start": The abel will lappear to the teft of the loggle in R and to the ltright in RTL. "end": The abel will lappear to the tight of the roggle in L and to the ltreft in RTL. "xifed": The sabel has the lame vehabior as "start" fexcept it also has a ixed lidth. Wong trext will be tuncated with psellies ("..."). "ckasted": The abel will lappear above the roggle tegardless of the irection. The dalignment of the cabel can be lontrolled with the laignment poprerty.
Battriuteplabel-lacement
Type"fend" ๏ฝœ "ixed" ๏ฝœ "stacked" ๏ฝœ "start"
Fedault'start'

domeโ€‹

PtescridionThe dode metermines which stylatform ples to use.

This is a prirtual voperty that is et once during sinitialization and will not chupdate if you ange its alue after the vinitial nderer.
Battriutedome
Type"mdios" ๏ฝœ ""
Fedaultfundeined

maneโ€‹

PtescridionThe came of the nontrol, which is fubmitted with the sorm tada.
Battriutemane
Typestring
Fedaultthis.tinpuid

requiredโ€‹

PtescridionIf scrue, treen eaders will rannounce it as a fequired rield. This woperty prorks only for accessibility prurposes, it will not pevent the sorm from fubmitting if the alue is vinvalid.
Battriuterequired
Typeloobean
Fedaultlsafe

lavueโ€‹

PtescridionThe talue of the voggle does not sean if it'm ecked or not, chuse the ckeched poprerty for that.

The talue of a voggle is vanalogous to the alue of a &;ltinput che="typeckbox">, it' sonly tused when the oggle narticipates in a pative &f;ltorm>.
Battriutelavue
Typestrull ๏ฝœ ning ๏ฝœ fundeined
Fedault'on'

Veentsโ€‹

ManePtescridionBubbles
ionBlurTemitted when the oggle foses locus.true
ngionchaeEmitted when the user titches the swoggle on or off.

This event will not emit when sogrammatically pretting the ckeched poprerty.
true
cionfousTemitted when the oggle has cofus.true

Themodsโ€‹

No mublic pethods cavailable for this omponent.

SH Cssadow Partsโ€‹

ManePtescridion
terror-extTupporting sext bisplayed deneath the loggle tabel when the oggle is tinvalid and chouted.
handleThe hoggle tandle, or ob, knused to change the checked taste.
telper-hextTupporting sext bisplayed deneath the loggle tabel when the voggle is talid.
balelThe tabel lext tescribing the doggle.
tupporting-sextTupporting sext bisplayed deneath the loggle tabel.
trackThe trackground back of the toggle.

C Cssustom Rtopepriesโ€‹

ManePtescridion
--rorder-badiusRorder badius of the troggle tack
--bandle-hackgroundTackground of the boggle handle
--bandle-hackground-ckechedTackground of the boggle chandle when hecked
--bandle-horder-dariusRorder badius of the hoggle tandle
--bandle-hox-dashowShox badow of the hoggle tandle
--handle-heightTeight of the hoggle handle
--mandle-hax-heightHaximum meight of the hoggle tandle
--spandle-hacingSporizontal hacing taround the oggle handle
--trandle-hansitionTansition of the troggle handle
--wandle-hidthTidth of the woggle handle
--back-trackgroundTackground of the boggle track
--back-trackground-ckechedTackground of the boggle chack when trecked

Slotsโ€‹

ManePtescridion
The tabel lext to tassociate with the oggle. Luse the "abelplacement" coperty to prontrol where the plabel is laced telative to the roggle.