Skip to main content

Radio

shadow

Radio element je upravená verzia štandardného HTML radio elementu, rozšírená o štýly pre dosiahnutie vizuálne konzistentnejšieho používateľského rozhrania naprieč rôznymi zariadeniami. Funguje podobne ako štandardné rádio tlačidlo a umožňuje používateľom vybrať jednu z množiny možností. Používa sa vo vnútri elementu radio group, ktorý im pridáva zarovnanie a zoskupuje ich do jedného celku.

Základné použitie

Inline

Pridaním vlastnosti inline sa elementy usporiadajú v horizontálnom rozložení.

Úprava štýlov

color

Pomocou vlastnosti color je možné zmeniť farbu radio elementu.

Atribúty a Vlastnosti

checked

DescriptionIndicates whether the switch is checked.
Attributechecked
Typeboolean
Defaultfalse

disabled

DescriptionIndicates whether the switch is unchecked.
Attributedisabled
Typeboolean
Defaultfalse

color

DescriptionSpecifies the color of the switch.
Attributecolor
Typestring
Defaultundefined

value

DescriptionSwitch value.
Attributevalue
Typestring
Defaultundefined

placement

DescriptionSpecifies the location of the label relative to the switch.
Attributeplacement
Typestring
Defaultstart

Eventy

NameDescription
wje-radio:changeCalled when the switch state changes.
wje-radio:inputInvoked when interacting with the switch.

Metódy

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Vlastnosti

NameDescription
--wje-radio-margin-inlineSpecifies the horizontal (left and right) offset for the switch. Accepts any valid CSS length unit (e.g. px, rem, %) to control the spacing on either side of the component.
--wje-radio-margin-topDefines the upper offset for the switch. Accepts any valid CSS length value to set the vertical spacing above the component.
--wje-radio-margin-bottomSets the lower offset for the switch. Accepts any valid CSS length value to set the vertical spacing below the component.

Sloty

NameDescription
``The default switch label content slot.