Skip to content

Commit

Permalink
docs(VChipGroup): add new example
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Apr 12, 2024
1 parent 6d58e09 commit 62a5c3c
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
94 changes: 94 additions & 0 deletions packages/docs/src/examples/v-chip-group/misc-reddit-categories.vue
@@ -0,0 +1,94 @@
<template>
<v-sheet
class="mx-auto"
max-width="400"
rounded="xl"
border
>
<div class="pa-4">
<div class="text-h6">What are you into?</div>

<div class="text-subtitle-1">Select topics to continue</div>

<v-responsive class="overflow-y-auto" max-height="280">
<v-chip-group class="mt-3" column>
<v-chip
v-for="topic in topics"
:key="topic"
:text="topic"
:value="topic"
></v-chip>
</v-chip-group>
</v-responsive>
</div>

<v-divider></v-divider>

<div class="pa-2">
<v-btn
color="orange-darken-1"
rounded="t-0 b-xl"
size="x-large"
text="Continue"
variant="flat"
block
></v-btn>
</div>
</v-sheet>
</template>

<script setup>
const topics = [
'๐ŸŽค Advice',
'๐Ÿ• Animals',
'๐Ÿค– Anime',
'๐ŸŽจ Art & Design',
'๐Ÿ’„ Beauty',
'๐Ÿข Business',
'๐Ÿ“š Books',
'๐Ÿ’ก Damn That\'s Interesting',
'๐Ÿ’ƒ Hobbies',
'๐ŸŽฎ Gaming',
'๐ŸŽฅ Movies',
'๐ŸŽต Music',
'๐Ÿ“บ TV',
'๐ŸŒฎ Food',
'๐Ÿ˜‚ Funny',
'๐Ÿ’– Health & Lifestyle',
'๐ŸŽ“ School',
'๐Ÿ“ฐ News',
'๐ŸŒฒ Nature',
'๐ŸŽจ Photography',
'๐ŸŽ Sports',
]
</script>

<script>
export default {
data: () => ({
topics: [
'๐ŸŽค Advice',
'๐Ÿ• Animals',
'๐Ÿค– Anime',
'๐ŸŽจ Art & Design',
'๐Ÿ’„ Beauty',
'๐Ÿข Business',
'๐Ÿ“š Books',
'๐Ÿ’ก Damn That\'s Interesting',
'๐Ÿ’ƒ Hobbies',
'๐ŸŽฎ Gaming',
'๐ŸŽฅ Movies',
'๐ŸŽต Music',
'๐Ÿ“บ TV',
'๐ŸŒฎ Food',
'๐Ÿ˜‚ Funny',
'๐Ÿ’– Health & Lifestyle',
'๐ŸŽ“ School',
'๐Ÿ“ฐ News',
'๐ŸŒฒ Nature',
'๐ŸŽจ Photography',
'๐ŸŽ Sports',
],
}),
}
</script>
6 changes: 6 additions & 0 deletions packages/docs/src/pages/en/components/chip-groups.md
Expand Up @@ -80,3 +80,9 @@ The `v-chip` component can have an explicit value used for its model. This gets
Chip groups allow the creation of custom interfaces that perform the same actions as an item group or radio controls, but are stylistically different.

<ExamplesExample file="v-chip-group/misc-toothbrush-card" />

#### Reddit style categories

Use a combination of utility classes and emojis to create a Reddit-style category selection.

<ExamplesExample file="v-chip-group/misc-reddit-categories" />

0 comments on commit 62a5c3c

Please sign in to comment.