Login
A sign-in form with typed submission callback.
Give your AI assistant this page as context.
Connect your library with MCPLoading Vue preview…
blocks/loginUsage
Choose Vue in the Studio and export your saved library, or install this item through its connected CLI/MCP. Vue setup and Nuxt integration.
<script setup lang="ts">
import LoginBlock from './components/blocks/login.vue'
</script>
<!-- Supply the required props and callbacks listed in Source and props. -->Design system
This Vue component consumes the same CodeRocket tokens as the React version. Import the compiled styles and wrap your app in ThemeScope. Tailwind is optional.
Behavior and accessibility
Vue uses native events, v-model and slots. Reka UI handles keyboard and focus behavior in complex primitives. Connect actions to your own application and review labels, contrast and mobile behavior in context. Components are experimental during early access.
The full ZIP also includes examples/block-showcase.vue, with populated block props, illustrations and local sample callbacks to adapt to your application.
Source and props
This is the exact Vue single-file component delivered by the export. Related helpers and dependencies are included automatically.
<script setup lang="ts">
import AuthFrame from "./auth-frame.vue";
import ActionForm from "./action-form.vue";
import PasswordInput from "./password-input.vue";
import type { FormAction } from "./common";
import Field from "../ui/field.vue";
import InputGroup from "../ui/input-group.vue";
import { ArrowRight, LockKeyhole, Mail } from "@lucide/vue";
defineProps<{ onSubmit: FormAction; signupHref: string; forgotHref: string }>();
</script>
<template>
<AuthFrame
title="Welcome back."
description="Sign in to your workspace and pick up where you left off."
eyebrow="Your workspace"
><template #icon><LockKeyhole :size="24" :stroke-width="1.75" /></template
><ActionForm
:on-submit="onSubmit"
submit-label="Sign in"
success-message="Signed in."
><Field label="Email address"
><InputGroup
name="email"
type="email"
autocomplete="email"
required
placeholder="you@company.com"
><template #leading
><Mail
:size="16"
aria-hidden="true" /></template></InputGroup></Field
><Field label="Password"
><PasswordInput name="password" auto-complete="current-password"
/></Field>
<div class="cr-auth-assistance">
<a class="cr-auth-link" :href="forgotHref">Forgot password?</a>
</div>
<template #submit-icon
><ArrowRight :size="17" aria-hidden="true" /></template></ActionForm
><template #footer
><p class="cr-auth-footer">
New here?
<a class="cr-auth-link" :href="signupHref"
>Create an account <ArrowRight :size="14" aria-hidden="true"
/></a></p></template
></AuthFrame>
</template>