Zum Hauptinhalt springen Seitenleiste
Zum Inhaltsverzeichnis springen

    Radio

    <pc-radio> 0.2.0 experimental

    Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

    Radios allow the user to select a single option from a radio group.

    Additional demonstrations can be found in the radio group demos.

    Properties#

    NameDescriptionReflectsDefault
    valueThe radio’s value. When selected, the radio group will receive this value.
    Type: string | undefined
    sizeThe radio’s size. When used inside a radio group, the size will be determined by the radio group’s size so this attribute can typically be omitted.
    Type: "small" | "medium" | "large"
    "medium"
    disabledDisables the radio.
    Type: boolean
    false
    updateComplete A read‐only promise that resolves when the component has finished updating.

    Learn more about attributes and properties.

    Slots#

    NameDescription
    (default)The radio’s label.

    Learn more about using slots.

    Events#

    NameDescriptionEvent detail
    pc-focusEmitted when the radio gains focus.
    pc-blurEmitted when the radio loses focus (i.e., is blurred).

    Learn more about events.

    Parts#

    NameDescription
    baseThe component’s base wrapper.
    controlThe circular container that wraps the radio’s checked state.
    control-checkedThe circular container that wraps the radio’s checked state only if it’s checked.
    checked-iconThe checked icon, an <svg> element.
    labelThe radio’s label.

    Learn more about customising CSS parts.

    Importing#

    If you’re using the autoloader or the standard loader, you can skip this section. But if you’re cherry picking, you can use any of the following snippets to import this component.

    CDN (script tag) CDN (import) npm (import)

    To manually import this component from the CDN, copy this code snippet and paste it in your HTML.

    <script type="module" src="https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.3/cdn/components/radio/radio.js"></script>

    To manually import this component from the CDN, copy this code snippet and paste it in your JavaScript file.

    import "https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.3/cdn/components/radio/radio.js";

    To manually import this component from npm, copy this code snippet and paste it in your JavaScript file.

    import "placer-toolkit/dist/components/radio/radio.js";

    Wir würden uns freuen, von dir zu hören. Bitte kontaktiere uns bei Fragen oder Anliegen, die du hast.

    Du kannst uns per E‐Mail unter placer.coc.reports+contact@gmail.com erreichen.

    Wir freuen uns darauf, von dir zu hören!

    Alles klar!
    Gefährliche Lande

    Ui! Du bist in die gefährlichen Lande von Placer Toolkit geraten. Version 0 ist veraltet und entspricht nicht den EU‐Datenschutzstandards, einschließlich DSGVO.

    Willst du die neuesten Kräfte, Sicherheit und Compliance? Bleib bei der aktuellen Version von Placer Toolkit!

    Ups! Aufladen!