You've already forked AstralRinth
forked from didirus/AstralRinth
45 lines
645 B
Markdown
45 lines
645 B
Markdown
### Simple example
|
|
|
|
```svelte example
|
|
<script lang="ts">
|
|
import { Chips } from "omorphia";
|
|
</script>
|
|
|
|
<Chips options={[
|
|
{
|
|
label: 'One',
|
|
value: 'one'
|
|
},
|
|
{
|
|
label: 'Two',
|
|
value: 'two'
|
|
}]}
|
|
/>
|
|
```
|
|
|
|
|
|
### Force an option to be selected with `neverEmpty`
|
|
|
|
```svelte example
|
|
<script lang="ts">
|
|
import { Chips } from "omorphia";
|
|
|
|
let foo = 'modpack'
|
|
</script>
|
|
|
|
<Chips neverEmpty bind:value={foo} options={[
|
|
{
|
|
label: 'Mod',
|
|
value: 'mod'
|
|
},
|
|
{
|
|
label: 'Modpack',
|
|
value: 'modpack'
|
|
},
|
|
{
|
|
label: 'World',
|
|
value: 'world'
|
|
}]}
|
|
/>
|
|
```
|