mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
23 lines
463 B
Svelte
23 lines
463 B
Svelte
<script>
|
|
import { TileGroup, RadioTile } from "carbon-components-svelte";
|
|
|
|
const values = ["Lite plan", "Standard plan", "Plus plan"];
|
|
|
|
let selected = values[1];
|
|
</script>
|
|
|
|
<TileGroup
|
|
legend="Service pricing tiers"
|
|
name="plan"
|
|
on:select={({ detail }) => (selected = detail)}
|
|
>
|
|
{#each values as value}
|
|
<RadioTile {value} checked={selected === value}>
|
|
{value}
|
|
</RadioTile>
|
|
{/each}
|
|
</TileGroup>
|
|
|
|
<br />
|
|
|
|
Selected: <strong>{selected}</strong>
|