dropdown-menu/dropdown-menu-radio-item.svelte

modernstack-saas · src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte · svelte · MIT
ui, UI / Frontend

Renders a selectable radio item in a dropdown menu with visual indicator.

<!--
  Source: https://github.com/joachimchauvet/modernstack-saas | License: MIT | Copyright 2025 joachimchauvet | https://github.com/joachimchauvet/modernstack-saas
  Provided via justclaw.it.com; keep this notice with the code.
-->
<script lang="ts">
	import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
	import CircleIcon from "@lucide/svelte/icons/circle";
	import { cn, type WithoutChild } from "$lib/utils.js";

	let {
		ref = $bindable(null),
		class: className,
		children: childrenProp,
		...restProps
	}: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();
</script>

<DropdownMenuPrimitive.RadioItem
	bind:ref
	data-slot="dropdown-menu-radio-item"
	class={cn(
		"focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key