Convert Figma logo to code with AI

semaphoreui logosemaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.

10,265
1,034
10,265
601

Top Related Projects

37,442

⚡️ Simple, Modular & Accessible UI Components for your React Applications

A utility-first CSS framework for rapid UI development.

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

An enterprise-class UI design language and React UI library

84,226

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

Quick Overview

Semaphore UI is an open-source React component library designed to provide a set of customizable and accessible UI components. It aims to offer a modern and flexible solution for building user interfaces in React applications, with a focus on simplicity and ease of use.

Pros

  • Comprehensive set of pre-built, customizable components
  • Emphasis on accessibility and adherence to WCAG guidelines
  • Lightweight and performant, with minimal dependencies
  • Well-documented API and usage examples

Cons

  • Relatively new project, may lack the maturity of more established UI libraries
  • Limited community support and ecosystem compared to larger alternatives
  • May require additional styling efforts to achieve specific design requirements
  • Documentation could be more extensive for advanced use cases

Code Examples

  1. Using a Button component:
import { Button } from '@semaphoreui/semaphore';

function MyComponent() {
  return (
    <Button variant="primary" onClick={() => console.log('Clicked!')}>
      Click me
    </Button>
  );
}
  1. Creating a simple form with Input and Select components:
import { Form, Input, Select } from '@semaphoreui/semaphore';

function MyForm() {
  return (
    <Form onSubmit={(e) => e.preventDefault()}>
      <Input label="Name" placeholder="Enter your name" />
      <Select label="Country" options={['USA', 'Canada', 'UK']} />
      <Button type="submit">Submit</Button>
    </Form>
  );
}
  1. Implementing a Modal dialog:
import { Modal, Button } from '@semaphoreui/semaphore';
import { useState } from 'react';

function MyModal() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <>
      <Button onClick={() => setIsOpen(true)}>Open Modal</Button>
      <Modal isOpen={isOpen} onClose={() => setIsOpen(false)}>
        <Modal.Header>Modal Title</Modal.Header>
        <Modal.Body>This is the modal content.</Modal.Body>
        <Modal.Footer>
          <Button onClick={() => setIsOpen(false)}>Close</Button>
        </Modal.Footer>
      </Modal>
    </>
  );
}

Getting Started

To start using Semaphore UI in your React project, follow these steps:

  1. Install the package:
npm install @semaphoreui/semaphore
  1. Import and use components in your React application:
import React from 'react';
import { Button, Card } from '@semaphoreui/semaphore';

function App() {
  return (
    <Card>
      <Card.Header>Welcome to Semaphore UI</Card.Header>
      <Card.Body>
        <p>Start building your UI with our components!</p>
        <Button variant="primary">Get Started</Button>
      </Card.Body>
    </Card>
  );
}

export default App;

Remember to wrap your application with the SemaphoreProvider component to ensure proper theming and configuration:

import { SemaphoreProvider } from '@semaphoreui/semaphore';

function Root() {
  return (
    <SemaphoreProvider>
      <App />
    </SemaphoreProvider>
  );
}

Competitor Comparisons

37,442

⚡️ Simple, Modular & Accessible UI Components for your React Applications

Pros of Chakra UI

  • Larger community and more active development (30k+ stars vs. 300+ for Semaphore)
  • More comprehensive documentation and examples
  • Wider range of pre-built components and utilities

Cons of Chakra UI

  • Steeper learning curve due to more complex API and features
  • Potentially larger bundle size for smaller projects
  • Less opinionated design system, requiring more customization

Code Comparison

Chakra UI button example:

import { Button } from "@chakra-ui/react"

function MyComponent() {
  return <Button colorScheme="blue">Click me</Button>
}

Semaphore UI button example:

import { Button } from "@semaphore-ui/core"

function MyComponent() {
  return <Button variant="primary">Click me</Button>
}

Both libraries offer a similar API for basic components, but Chakra UI provides more customization options out of the box. Semaphore UI aims for simplicity and a more opinionated design system, which can be beneficial for rapid prototyping or smaller projects. Chakra UI's extensive feature set and flexibility make it more suitable for larger, complex applications with specific design requirements.

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Larger community and more extensive documentation
  • More frequent updates and active development
  • Wider range of pre-built components and utilities

Cons of Tailwind CSS

  • Steeper learning curve due to its utility-first approach
  • Potentially larger file sizes if not properly optimized
  • Less opinionated, requiring more decision-making from developers

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Button
</button>

Semaphore:

<button class="btn btn-primary">
  Button
</button>

Tailwind CSS uses utility classes to style elements directly, while Semaphore relies on pre-defined component classes. Tailwind's approach offers more flexibility but requires more markup, whereas Semaphore provides a simpler, more concise syntax at the cost of customization options.

Both frameworks aim to streamline UI development, but they differ in their philosophies. Tailwind CSS emphasizes granular control and customization, while Semaphore focuses on providing ready-to-use components with less configuration required.

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

Pros of Material-UI

  • Extensive component library with a wide range of pre-built UI elements
  • Strong community support and regular updates
  • Comprehensive documentation and examples

Cons of Material-UI

  • Larger bundle size due to the extensive component library
  • Steeper learning curve for customization and theming
  • Opinionated design system may require more effort to deviate from Material Design

Code Comparison

Material-UI:

import { Button, TextField } from '@mui/material';

function MyComponent() {
  return (
    <>
      <TextField label="Name" variant="outlined" />
      <Button variant="contained" color="primary">Submit</Button>
    </>
  );
}

Semaphore:

import { Button, Input } from '@semaphore-ui/core';

function MyComponent() {
  return (
    <>
      <Input label="Name" />
      <Button variant="primary">Submit</Button>
    </>
  );
}

The code comparison shows that both libraries offer similar components with slightly different syntax and styling approaches. Material-UI follows the Material Design system more closely, while Semaphore provides a more minimalistic approach. Material-UI offers more customization options out of the box, but Semaphore's simpler API may be easier for beginners to grasp.

An enterprise-class UI design language and React UI library

Pros of Ant Design

  • Larger community and more extensive ecosystem
  • Comprehensive documentation and examples
  • Wider range of components and customization options

Cons of Ant Design

  • Steeper learning curve due to its complexity
  • Larger bundle size, which may impact performance
  • Opinionated design system that may not fit all projects

Code Comparison

Ant Design component usage:

import { Button } from 'antd';

const MyComponent = () => (
  <Button type="primary">Click me</Button>
);

Semaphore component usage:

import { Button } from '@semaphore-ui/core';

const MyComponent = () => (
  <Button variant="primary">Click me</Button>
);

Both libraries offer similar component APIs, but Ant Design generally provides more props and configuration options. Semaphore aims for simplicity and ease of use, while Ant Design offers more advanced features and customization.

Ant Design is a mature, feature-rich UI library with a large community and extensive documentation. It's well-suited for complex enterprise applications but may be overkill for smaller projects. Semaphore, on the other hand, focuses on simplicity and lightweight components, making it a good choice for smaller projects or teams that prefer a more minimalist approach.

84,226

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

Pros of Storybook

  • Larger community and ecosystem with extensive addons and integrations
  • Supports multiple frontend frameworks (React, Vue, Angular, etc.)
  • Comprehensive documentation and learning resources

Cons of Storybook

  • Steeper learning curve for beginners
  • Can be overkill for smaller projects
  • Requires more setup and configuration

Code Comparison

Semaphore component example:

import { Button } from '@semaphore-ui/core'

function MyComponent() {
  return <Button variant="primary">Click me</Button>
}

Storybook story example:

import { Button } from './Button'

export default {
  title: 'Components/Button',
  component: Button,
}

export const Primary = () => <Button variant="primary">Click me</Button>

While both projects aim to improve component development and documentation, Storybook offers a more comprehensive solution for larger teams and complex projects. Semaphore focuses on providing a simpler, more streamlined approach for React applications.

Storybook's extensive ecosystem and cross-framework support make it a versatile choice for diverse projects. However, this comes at the cost of increased complexity and setup time. Semaphore, being more focused on React, offers a simpler integration process but with fewer features and less flexibility.

The code examples demonstrate that while Semaphore components can be used directly in your application, Storybook requires additional setup to create and organize stories for each component.

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

Pros of styled-components

  • Offers a more intuitive and component-based approach to styling
  • Provides automatic critical CSS and vendor prefixing
  • Allows for dynamic styling based on props

Cons of styled-components

  • Can lead to larger bundle sizes due to runtime CSS generation
  • May have a steeper learning curve for developers new to CSS-in-JS
  • Potential performance overhead in large applications

Code Comparison

styled-components:

const Button = styled.button`
  background-color: ${props => props.primary ? 'blue' : 'white'};
  color: ${props => props.primary ? 'white' : 'blue'};
  padding: 10px 20px;
  border: 2px solid blue;
`;

Semaphore:

<Button
  className={`btn ${primary ? 'btn-primary' : 'btn-secondary'}`}
  style={{ padding: '10px 20px', border: '2px solid blue' }}
>
  Click me
</Button>

Summary

styled-components offers a more integrated and dynamic approach to styling React components, with benefits like scoped styles and prop-based styling. However, it may introduce complexity and potential performance issues in larger projects. Semaphore, being a UI library, likely provides pre-built components and a more traditional approach to styling, which may be easier to adopt but less flexible for custom designs.

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

Semaphore UI (formerly Ansible Semaphore)

docker patreon ko-fi telegram telegram

Semaphore is a modern UI for Ansible, Terraform/OpenTofu, Bash and Pulumi. It lets you easily run Ansible playbooks, get notifications about fails, control access to deployment system.

If your project has grown and deploying from the terminal is no longer for you then Semaphore UI is what you need.

responsive-ui-phone1

Installation

Docker

https://hub.docker.com/r/semaphoreui/semaphore

docker-compose.yml for minimal configuration:

services:
  semaphore:
    ports:
      - 3000:3000
    image: semaphoreui/semaphore:latest
    environment:
      SEMAPHORE_DB_DIALECT: bolt
      SEMAPHORE_ADMIN_PASSWORD: changeme
      SEMAPHORE_ADMIN_NAME: admin
      SEMAPHORE_ADMIN_EMAIL: admin@localhost
      SEMAPHORE_ADMIN: admin
      TZ: Europe/Berlin
    volumes:
      - /path/to/data/home:/etc/semaphore # config.json location
      - /path/to/data/lib:/var/lib/semaphore # database.boltdb location (Not required if using mysql or postgres)

Other installation methods

https://docs.semaphoreui.com/administration-guide/installation

Demo

You can test latest version of Semaphore on https://dash.semaphoreui.com.

Docs

Admin and user docs: https://docs.semaphoreui.com.

API description: https://semaphoreui.com/api-docs/.