Giter Site home page Giter Site logo

ui's Introduction

Supabase UI

Supabase UI is a React UI library.

๐Ÿšง
Supabase UI is still a work-in-progress until a major release is published.

Product hunt

View docs

Install Supabase UI

npm install @supabase/ui

Using Supabase UI

Example of importing a component

import { Button } from '@supabase/ui'

//...

return <Button>I am a Supabase UI button</Button>

It is probably advisable to use Normalize with Supabase UI for the timebeing.

Using Icons

We use Feather icon library in Supabase UI

You can use any Icon from the library as a component by prepending Icon to any Icon name, like, <IconMail>

import { IconMail } from '@supabase/ui'

//...

return <IconMail size="small" />

Using Supabase UI Auth

You can use our Auth widget straight out the box with Supabase auth including social logins.

Screenshot 2021-02-05 at 19 25 01

The Auth component also includes a context component which detects whether a user is logged in or not.

Make sure to also install @supabase/supabase-js

npm install @supabase/supabase-js

You can then easily import Auth from the ui library and pass the createClient to the Auth component.

import { Auth, Typography, Button } from "@supabase/ui";
import { createClient } from "@supabase/supabase-js";

const { Text } = Typography

// Create a single supabase client for interacting with your database
const supabase = createClient(
  "https://xyzcompany.supabase.co",
  "public-anon-key"
);

const Container = (props) => {
  const { user } = Auth.useUser();
  if (user)
    return (
      <>
        <Text>Signed in: {user.email}</Text>
        <Button block onClick={() => props.supabaseClient.auth.signOut()}>
          Sign out
        </Button>
      </>
    );
  return props.children;
};

export default function Home() {
  return (
    <Auth.UserContextProvider supabaseClient={supabase}>
      <Container supabaseClient={supabase}>
        <Auth providers={['facebook', 'github']} supabaseClient={supabase}/>
      </Container>
    </Auth.UserContextProvider>
  );
};

Roadmap

Some of these are a work in progress - we invite anyone to submit a feature request if there is something you would like to see.

General

  • Button
  • Typography
  • Icon
  • Image (work in progress)

Data Input

  • Input
  • InputNumber
  • Select (custom select wip)
  • Checkbox
  • Radio
  • Toggle
  • Upload
  • Slider
  • Date picker
  • Time picker
  • Form

Layout

  • Layout
  • Grid (Flex)
  • Divider
  • Space (Flex)

Display

  • Card
  • Avatar
  • Accordion
  • Alert
  • Badge
  • Menu
  • Tooltips
  • Tables
  • Code block

Navigation

  • Tabs
  • Breadcrumb
  • Dropdown
  • Menu
  • Page Header
  • Sidebar
  • Flyout menu
  • Steps

Overlay

  • Modal
  • Context Menu
  • Drawer / SidePanel
  • Toast messages / Notification
  • Progress
  • Feeds / Timeline

Utility

  • Loading
  • Transition (work in progress)

Misc

  • Storybook docs
  • Theming (in progress)
  • Supabase Auth Elements
  • Documentation website

We would be keen to hear any feedback on this project.

Feel free to submit a question or idea here

ui's People

Contributors

mildtomato avatar jonthomp avatar thorwebdev avatar phamhieu avatar mrkldshv avatar yashkandalkar avatar iamshankhadeep avatar i-pip avatar kiwicopple avatar galanteria01 avatar 0xflotus avatar awalias avatar dhaiwat10 avatar joshenlim avatar mryechkin avatar orhantozan avatar harshithpabbati avatar harshcut avatar ankitjena avatar angelmtztrc avatar nazeeh21 avatar stevenschmatz avatar menor avatar enochndika avatar easy-street avatar ceo0x avatar wallacemyem avatar chipilov avatar thesayyn avatar ru88s avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.