Skip to content
CodeAtlas UI

Layout

AuthLayout

A two-column page for sign in, sign up and password reset, with AuthCard for the form.

<script>
  import { AuthLayout, AuthCard, TextField, Button, Stack } from "@codeatlasdev/ui";
</script>

<AuthLayout logoName="Acme">
  {#snippet panel()}
    <blockquote>Ship the boring parts in a day.</blockquote>
  {/snippet}

  <AuthCard title="Welcome back" subtitle="Sign in to continue">
    <form>
      <Stack gap="3">
        <TextField label="Email" type="email" />
        <Button type="submit" fullWidth>Sign in</Button>
      </Stack>
    </form>
    {#snippet footer()}
      <a href="/sign-up">Create an account</a>
    {/snippet}
  </AuthCard>
</AuthLayout>

AuthLayout renders the page <main id="main">, so a route that uses it must not add another one. The panel snippet fills the side column; below 768px it is hidden and mobileBrand shows a compact brand strip above the form. The full pages live in the sign in, sign up and forgot password templates.

AuthLayout props

PropTypeDefaultDescription
logoMarkstring'CA'Text inside the logo square.
logoNamestring'CodeAtlas UI'Product name next to the mark.
logoHrefstring'/'Where the logo links to.
mobileBrandbooleantrueShows the compact brand strip below 768px, where the side panel is hidden.
brandSnippet–Replaces the default logo.
panelSnippet–Content of the side column.
childrenSnippet–The form column, usually an AuthCard.

AuthCard props

PropTypeDefaultDescription
titlestring–Heading of the card.
subtitlestring–Text under the heading.
footerSnippet–Links under the form, such as sign up.
childrenSnippet–The form.