Appearance
Appearance
Using forms
Alert component). Use the role prop to make the announcement more polite or more intrusive. Test with a screenreader.const text = ref('')
const switched = ref(false)
const username = ref('')
const password = ref('')
const options = {
'required': 'We will not send you any E-Mails unless legally required',
'important only': 'You will be informed about important changes only',
'everything': 'You will receive updates about every change'
} as const
const option = ref<keyof typeof options>('required')
const roles = {
1: 'Maintainer',
2: 'Contributor',
3: 'User'
} as const
const role = ref<keyof typeof roles>(2)
const suggestions = [{
label: 'Tag-A',
isCustom: false
}, {
label: 'Tag-B',
isCustom: false
}, {
label: 'Tag-C',
isCustom: false
}, {
label: 'suggestion',
isCustom: false
} as const]
const pills = ref(suggestions.filter(s => s.label.includes('Tag')))
const errors = computed(() =>
text.value.includes(' ')
? [ 'Make sure your message does not contain any spaces' ]
: []
)<Layout
stack
class="color-default-solid"
style="overflow: scroll; height: 83px; border-radius: 8px;"
>
<Alert
v-for="(error, index) in errors"
:key="error"
class="color-destructive-solid"
>
Error {{ index + 1 }} / {{ errors.length }}: {{ error }}
</Alert>
</Layout>
<Spacer />
<Layout
form
stack
gap-48
>
<Textarea
v-model="text"
label="Your message"
/>
<Tokens v-model="pills" :suggestions label="Tags" />
<Select
v-model="role"
class="shape-field-full"
:options="roles"
label="Select a role"
/>
<Switch
v-model="switched"
label="Enable plugins"
/>
<Input
v-model="username"
label="User name"
autocomplete="username"
/>
<Input
v-model="password"
label="Password"
password
/>
<Slider
v-model="option"
:options
label="Receive E-Mails?"
/>
<Button class="color-primary-solid">
<Icon icon="mdi:check" />
Submit
</Button>
</Layout>