Convert Figma logo to code with AI

stefan-karger logosolid-ui

Beautifully designed components. Built with Kobalte & corvu. Styled with Tailwind CSS.

1,089
43
1,089
10

Quick Overview

Solid-UI is a library of UI components and utilities designed for use with Solid.js, a declarative JavaScript library for building user interfaces. It provides a set of reusable components and hooks to streamline the development of Solid.js applications, offering a balance between flexibility and convenience.

Pros

  • Comprehensive set of UI components tailored for Solid.js
  • Lightweight and performant, leveraging Solid.js's efficient rendering system
  • Customizable components with a consistent API
  • Active development and community support

Cons

  • Limited documentation compared to more established UI libraries
  • Smaller ecosystem compared to React or Vue.js alternatives
  • May require more manual styling and theming compared to some other UI libraries
  • Learning curve for developers new to Solid.js

Code Examples

  1. Creating a simple button component:
import { Button } from '@solid-ui/core';

function MyComponent() {
  return (
    <Button onClick={() => console.log('Clicked!')}>
      Click me
    </Button>
  );
}
  1. Using a modal component:
import { Modal, Button } from '@solid-ui/core';
import { createSignal } from 'solid-js';

function ModalExample() {
  const [isOpen, setIsOpen] = createSignal(false);

  return (
    <>
      <Button onClick={() => setIsOpen(true)}>Open Modal</Button>
      <Modal isOpen={isOpen()} onClose={() => setIsOpen(false)}>
        <h2>Modal Content</h2>
        <p>This is the modal body.</p>
      </Modal>
    </>
  );
}
  1. Implementing a form with validation:
import { Form, Input, Button } from '@solid-ui/core';
import { createStore } from 'solid-js/store';

function FormExample() {
  const [form, setForm] = createStore({
    username: '',
    password: '',
  });

  const handleSubmit = (e) => {
    e.preventDefault();
    console.log('Form submitted:', form);
  };

  return (
    <Form onSubmit={handleSubmit}>
      <Input
        label="Username"
        value={form.username}
        onInput={(e) => setForm('username', e.target.value)}
        required
      />
      <Input
        type="password"
        label="Password"
        value={form.password}
        onInput={(e) => setForm('password', e.target.value)}
        required
      />
      <Button type="submit">Submit</Button>
    </Form>
  );
}

Getting Started

To start using Solid-UI in your Solid.js project:

  1. Install the package:

    npm install @solid-ui/core
    
  2. Import and use components in your Solid.js application:

    import { Button, Input } from '@solid-ui/core';
    
    function App() {
      return (
        <div>
          <h1>My Solid.js App</h1>
          <Input placeholder="Enter your name" />
          <Button>Submit</Button>
        </div>
      );
    }
    
  3. Customize components using props or CSS-in-JS solutions compatible with Solid.js.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

SolidUI

This is an unofficial port of shadcn/ui & tremor-raw to Solid.

Accessible and customizable components that you can copy and paste into your apps. Free. Open Source. Use this to build your own component library.

hero

Documentation

Visit https://www.solid-ui.com to view the documentation.

License

Published under the MIT license. Built by @stefan-karger, @michaelessiet & community.

Star History

Star History