Skip to content

CSS: radio

.instui-radio — բնիկ ռադիոընտրիչ և դրա պիտակ։

Ստեղում է իր իսկ gap-ը կառավարման և դրա պիտակի միջև; -gap-* տարածության օգտակարալի փոխկապակցումը հերթականությունը գերազանցում է այդ կառուցված ներմուծված արժեքը։

Source: radio.css

Մուտքականություն

Բնական <input type="radio">-ը ճանաչում է :checked-ը և :disabled-ը; -readonly-ը միայն ոճավորումն է, քանի որ ռադիոժամփորդները չունեն բնիկ readonly հատկություն։

Օգտագործում

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/radio.css";

Օրինակներ

html
<label class="instui-radio"><input type="radio" name="r" checked> Option A</label>

Մոդիֆիկատորներ

ՄոդիֆիկատորՆկարագիր
.-context-dangerՄեծարության (Danger) համատեքստային գույն (թողնային տարբերակ՝ toggle):
.-context-offԱնջատ/Նեյտրալ համատեքստային գույն (թողնային տարբերակ՝ toggle):
.-context-successՑանկացածության (Success) համատեքստային գույն (թողնային տարբերակ՝ toggle):
.-context-warningԱզդարարության (Warning) համատեքստային գույն (թողնային տարբերակ՝ toggle):
.-readonlyՄիակ ընթերցման (read-only) վիճակ.
.-size-largeՄեծ։ -size-lg–ի երկարաձգված անունը։
.-size-lgՄեծ։
.-size-smՓոքր։
.-size-smallՓոքր. -size-sm–ի երկարաձգված անունը։
.-toggleAlias — maps to .-variant-toggle.
.-variant-toggleՑուցադրել որպես բաժանված (segmented) թողնակի կոճակ։

Պսևդո-էլեմենտներ

Պսևդո-էլեմենտՆկարագիր
::beforeՍտուգվելու դեպքում ցուցադրվող լցված ներքին կետը; -variant-toggle-ում դա ուշադրության օղակն է, որը գծված է պիլլի անմիջապես դուրս։

Փոփոխական վիճակներ

ՎիճակՆկարագիր
:checked
:disabled

Անհատական հատկություններ

ԱռանձնահատկությունՏիպԸնթացիկՆկարագիր
--pantoken-rt-fill<color>Թողնակի ընտրված լցման գույնը; այն սահմանվում է -context-* փոփոխականներով։

Ցուցիչներ սպառված

TokenՏիպԱրժեք
--instui-component-radio-input-background-color<color>LightDarklight-dark(#ffffff, #171B21)
--instui-component-radio-input-background-disabled-color<color>LightDarklight-dark(#E8EAEC, #334450)
--instui-component-radio-input-background-hover-color<color>LightDarklight-dark(#ffffff, #171B21)
--instui-component-radio-input-background-readonly-color<color>LightDarklight-dark(#C7CACD, #6A7883)
--instui-component-radio-input-border-color<color>LightDarklight-dark(#7E8792, #5F6E7A)
--instui-component-radio-input-border-disabled-color<color>LightDarklight-dark(#C7CACD, #4A5B68)
--instui-component-radio-input-border-hover-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-radio-input-border-readonly-color<color>#8D959F
--instui-component-radio-input-border-selected-color<color>LightDarklight-dark(#1C222B, #ffffff)
--instui-component-radio-input-border-width<length>0.0625rem
--instui-component-radio-input-checked-inset-lg<length>0.375rem
--instui-component-radio-input-checked-inset-md<length>0.375rem
--instui-component-radio-input-checked-inset-sm<length>0.375rem
--instui-component-radio-input-control-size-lg<length>1.5rem
--instui-component-radio-input-control-size-md<length>1.5rem
--instui-component-radio-input-control-size-sm<length>1.5rem
--instui-component-radio-input-control-vertical-margin<length>0rem
--instui-component-radio-input-font-family[ <font-family-name> | <generic-font-family> ]#Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif
--instui-component-radio-input-font-size-lg<length>1.25rem
--instui-component-radio-input-font-size-md<length>1rem
--instui-component-radio-input-font-size-sm<length>0.875rem
--instui-component-radio-input-font-weight<integer>400
--instui-component-radio-input-gap<length>0.5rem
--instui-component-radio-input-label-base-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-radio-input-label-disabled-color<color>LightDarklight-dark(#8D959F, #576773)
--instui-component-radio-input-label-hover-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-radio-input-label-readonly-color<color>LightDarklight-dark(#273540, #F2F4F5)
--instui-component-radio-input-line-height-lg<length>1.5rem
--instui-component-radio-input-line-height-md<length>1.5rem
--instui-component-radio-input-line-height-sm<length>1.25rem
--instui-component-radio-input-toggle-background-danger<color>#CF4A00
--instui-component-radio-input-toggle-background-off<color>#03893D
--instui-component-radio-input-toggle-background-success<color>#03893D
--instui-component-radio-input-toggle-background-warning<color>#CF4A00
--instui-component-radio-input-toggle-border-radius<length>0.25rem
--instui-component-radio-input-toggle-handle-text<color>#ffffff
--instui-component-radio-input-toggle-large-font-size<length>1rem
--instui-component-radio-input-toggle-large-height<length>3rem
--instui-component-radio-input-toggle-medium-font-size<length>0.875rem
--instui-component-radio-input-toggle-medium-height<length>2.5rem
--instui-component-radio-input-toggle-small-font-size<length>0.75rem
--instui-component-radio-input-toggle-small-height<length>2rem
--instui-elevation-depth1none | <shadow>#
--instui-focus-outline-colorauto | <color>
--instui-focus-outline-styleauto | <outline-line-style>
--instui-focus-outline-width<line-width>

Ավելին կապված

  • checkbox — բազմա-նախընտրական համարժեքը մեկընտրական ռադիոյին։
  • radio-input-group — Արձանագրում է ռադիները մեկ միասնական ընտրության fieldset-ում։