Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 852 Bytes

File metadata and controls

35 lines (24 loc) · 852 Bytes

PrimitiveRadio

Static radio for usage outside forms as visual indicator without focusing and clicking

Props

All available props see in PrimitiveRadio.props.ts

Figma

Component in figma project

Usage

<template>
  <primitive-radio :value="value">
    <input type="radio" :checked="value" @change="onChange" />
  </primitive-radio>
</template>

<script setup lang="ts">
import { PrimitiveRadio } from '@tok/ui/components/PrimitiveRadio';
import { ref } from 'vue';

const value = ref(false);

const onChange = (event: Event) => {
  const target = event.target as HTMLInputElement;
  const _value = target.value;

  // manipulate with _value
};
</script>