GithubHelp home page GithubHelp logo

pheralb / superui Goto Github PK

View Code? Open in Web Editor NEW
148.0 5.0 7.0 1.5 MB

πŸš€ A Tailwindcss component library.

Home Page: https://superui.vercel.app

License: MIT License

JavaScript 3.84% TypeScript 84.76% CSS 11.10% Shell 0.30%
components nextjs tailwindcss turborepo ui supabase-hackathon components-library react hacktoberfest

superui's Introduction

πŸ’š Supabase Launch Week 5 Hackathon:

πŸ’– Maintainers:

✌️ Socials
Pablo Hdez GitHub - Twitter
Nacho Aldama GitHub - Twitter
David Huertas GitHub - Twitter
Juan Rojas GitHub - Twitter

πŸ“Ή Video:

πŸ“¦ Packages:

  • πŸš€ Turborepo - The High-performance Build System for JavaScript & TypeScript Codebases.
  • ⚑️ Nextjs - The React Framework for Production.
  • βš’οΈ React 18 - A JavaScript library for building user interfaces.
  • πŸ’™ Typescript - A superset of JavaScript.
  • πŸ’š Supabase - Build in a weekend. Scale to millions.
  • πŸ’… Chakra UI for docs - Create accessible React apps with speed.
  • πŸ’¨ TailwindCSS for library - Rapidly build modern websites without ever leaving your HTML.
  • πŸ’– React-Icons - A flexible icon family for everyone.
  • ⬛ CodeSandbox Sandpack - A component toolkit for creating live-running code editing experiences, using the power of CodeSandbox.

πŸš€ Getting Started:

  1. Clone the repository:
git clone https://github.com/pheralb/superui.git
  1. Install dependencies:
cd superui
npm install
  1. Create a Supabase database with the following query:
create table components (
  id bigint generated by default as identity primary key,
  user_id uuid references auth.users not null,
  title text check (char_length(title) > 3),
  description text,
  code text,
  inserted_at timestamp with time zone default timezone('utc'::text, now()) not null
);

create table public.users (
  id uuid not null primary key, -- UUID from auth.users
  email text,
  raw_user_meta_data text
);
πŸ”¨ trigger functions:

Trigger function to adding users when register for the first time:

create or replace function public.handle_new_user() 
returns trigger as $$
begin
  insert into public.users (id, email)
  values (new.id, new.email,new.raw_user_meta_data);
  return new;
end;
$$ language plpgsql security definer;

create trigger on_auth_user_created
  after insert on auth.users
  for each row execute procedure public.handle_new_user();
  1. Copy Supabase URL & Anon api key from your database and create a .env file in the /app folder with the following content:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
  1. Run the following command to start the development server:
npm run dev

And ready πŸ₯³, go to localhost:3001.

πŸ”‘ License:

superui's People

Contributors

ikurotime avatar miguelgargallo avatar nachoaldamav avatar pheralb avatar tmchein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

superui's Issues

UI: Aside menu

Aside menu with the show/hidde button enabled on small screens

How does "My components" works?

Been checking around the library and it's great, but I don't get how "my components" section works, it has to be accepted to get into the official component list?

Fix errors in Pin Component

Due to how value handling is written, some values ​​are lost when typing fast.

  • Use useState to handle values.
  • Keep onKeyUp for delete logic.
  • Fire handleSubmit after last value.

Docs

How to make a doc:

  1. Create MDX file in /app/docs
  2. Start adding meta information, check another file for reference
  3. The first line should be the module import
  4. Add examples
  5. To import examples, create a component in /app/src/demo/{component}
  6. Add that component to /app/component/mdx/index.tsx
  7. Use the Element in the MDX file, you can find references in another files.

500 when trying to preview my component

Buenas! jugueteando un poco con la librerΓ­a (brutal, por cierto), me he encontrado con un 500 al intentar visualizar mi componente. No sΓ© si es un bug conocido, pero por si acaso aquΓ­ os lo dejo!

Grabacion.de.pantalla.2023-06-02.a.las.8.53.08.mov

Install Tailwind in app

  • Add tailwindcss dependency
  • Create tailwind config file
  • Add SuperUI to content array
  • Tailwind styles

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.