UI components for Supabase authentication using Svelte. Inspired by the React version.
View the components in action:
Install the npm package:
yarn install -D supabase-ui-svelte
Import the component:
import Auth from 'supabase-ui-svelte'
Create a supabase client:
import { createClient } from '@supabase/supabase-js'
// get keys via the settings page at https://app.supabase.io
const supabaseClient = createClient('<your supabase url>', '<your supabase key>')
Add the component anywhere on your page:
<Auth {supabaseClient}/>
supabaseClientRequired. This is the supabase client object. Call createClient() to get it.
viewA string that sets which view to display.
Can be one of sign_in | sign_up | magic_link | forgotten_password. Default is sign_in.
providersAn array of string. Can be any combination of ['facebook', 'google', 'twitter', 'github', 'gitlab', 'bitbucket', 'azure', 'discord']. When left empty, the social login option is not displayed.
Default is an empty array.
socialButtonSizeA string that specifies the size of the social buttons. Can be one of tiny | small | medium | large | xlarge.
Default is medium.
socialLayoutA string that specifies the layout direction of the social buttons. Valid options are horizontal or vertical.
Default is vertical.
socialColorsA boolean that indicates whether the social buttons should use the brand's colors.
Default is false.
classA string of CSS classes to add to the outermost container.
Default is empty.
styleA string of CSS attributes to add to the outermost container.
Default is empty.
MIT