GithubHelp home page GithubHelp logo

dracula / dracula-ui Goto Github PK

View Code? Open in Web Editor NEW
893.0 125.0 45.0 61.36 MB

:vampire: A dark-first collection of UI patterns and components.

Home Page: https://ui.draculatheme.com

License: MIT License

JavaScript 2.07% TypeScript 77.98% CSS 19.66% Shell 0.28%

dracula-ui's Introduction

๐Ÿšง Dracula UI is no longer maintained. Read announcement.

Dracula UI

A dark-first collection of UI patterns and components.

Dracula UI

๐Ÿค” Why

Most templates are built using light colors and later on adapted to dark colors. Dark themes shouldn't be an afterthought, they should be a top priority.

Our mission is to unleash the creative potential in every developer. We do that by providing modular components that can be used to build modern sites faster.

๐Ÿ“– Documentation

You can access the documentation at: ui.draculatheme.com

๐Ÿ“ฆ Install

You can install Dracula UI via npm or yarn.

npm install dracula-ui

yarn add dracula-ui

โšก Using with HTML

You can use Dracula UI with plain HTML by importing the CSS file.

<link rel="stylesheet" href="node_modules/dracula-ui/styles/dracula-ui.css" />

Or by importing it on your main JavaScript file (when using a tool like Vite, for example).

import 'dracula-ui/styles/dracula-ui.css'

You can also import Dracula UI via npm's unpkg CDN:

<link
  rel="stylesheet"
  href="https://unpkg.com/[email protected]/styles/dracula-ui.css"
/>

Now you can take advantage of all the classes, for example:

<p class="drac-text drac-text-black">Hello Vampire</p>

See full example.

โœจ Using with React

You can also use Dracula UI with React by importing the JS package.

import 'dracula-ui/styles/dracula-ui.css'
import { Paragraph } from 'dracula-ui'

function App() {
  return <Paragraph color="black">Hello Vampire</Paragraph>
}

export default App;

See full example.

๐Ÿš€ Using with Next.js

First, you need to import the CSS globally.

Go to pages/_app.js (or create this file if it doesn't exist yet) and add the CSS import:

import 'dracula-ui/styles/dracula-ui.css'

function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />
}

export default MyApp

Then you can import Dracula UI and use all React components.

import { Paragraph } from 'dracula-ui'

export default function Index() {
  return <Paragraph color="black">Hello Vampire</Paragraph>
}

See full example.

๐Ÿงช Using with Jekyll

Go to _config.yml and include the node_modules folder:

include:
  - node_modules

Create a Sass file at assets/css/styles.scss with the following content:

---
---
@import "../../node_modules/dracula-ui/styles/dracula-ui.css"

The empty front matter at the top tells Jekyll it needs to process the Dracula UI file.

Finally, include the compiled CSS file into your _layouts.

<link rel="stylesheet" href="/assets/css/styles.css">

See full example.

๐Ÿ’ก Ideas

You can suggest new ideas using GitHub Discussions.

๐Ÿ‘‹ Questions

If you find a problem, feel free to open new GitHub Issues.

โœ๏ธ License

MIT License ยฉ Zeno Rocha

dracula-ui's People

Contributors

dependabot[bot] avatar guilhermesdev avatar helderberto avatar insidiae avatar itaibo avatar jhortale avatar keloran avatar koki-develop avatar leandrocunha avatar luxonauta avatar nettofarah avatar pbteja1998 avatar rixcy avatar theerakarnm avatar vitormalencar avatar zainsci avatar zenorocha 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  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

dracula-ui's Issues

Local run not working on Windows

I want to access the documentation, but following the README steps localhost:3000 didn't worked.

I have tried on Windows using Ubuntu-20.04 through WSL 2.

Link

I recommend changing the Link component to another name because it may conflict with NEXT / LINK
My suggestion "DracLink " hahahahah

Input not recognizing type prop

Hi guys,

We are trying to use the inputs with different types, like password etc, there is one specific reason for not come with type property?

image

Create <Kdb> component

Render a <kdb> tag with OS detection. For example:

<Kdb osx="โ‡งโŒ˜P" win="Ctrl+Shift+P" />

Remove all extraneous DOM properties

i.e. make sure HTML elements only receive:

  • Actual Dracula UI component props
  • Any valid HTML prop

We shouldn't see something like hoverColor show up in an a tag though.

Adding color prop to Avatar sets backround

If you add a color to the Avatar component it sets a background on the Avatar element that clears the image in it.
Version: 0.8.0

// Not working
<Avatar
    src="/avatar.jpg"
    color="cyanGreen"
/>

Unable to use <Button as="input" />

I'm getting the following error when creating a test with <Button as="input" />.

 FAIL  src/components/Button/__tests__/Button.test.tsx (22.277 s)
  โ— Console

    console.error
      The above error occurred in the <input> component:
      
          at input
          at Button (/Users/zeno/Projects/dracula-ui/src/components/Button/Button.tsx:62:71)
          at div
          at WrapperComponent (/Users/zeno/Projects/dracula-ui/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
      
      Consider adding an error boundary to your tree to customize error handling behavior.
      Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.

      at logCapturedError (node_modules/react-dom/cjs/react-dom.development.js:20085:23)
      at update.callback (node_modules/react-dom/cjs/react-dom.development.js:20118:5)
      at callCallback (node_modules/react-dom/cjs/react-dom.development.js:12318:12)
      at commitUpdateQueue (node_modules/react-dom/cjs/react-dom.development.js:12339:9)
      at commitLifeCycles (node_modules/react-dom/cjs/react-dom.development.js:20736:11)
      at commitLayoutEffects (node_modules/react-dom/cjs/react-dom.development.js:23426:7)
      at HTMLUnknownElement.callCallback (node_modules/react-dom/cjs/react-dom.development.js:3945:14)
      at innerInvokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:316:27)

Try to access "Spacing" breaks the build

There are 2 "Spacing" links (under "Getting Started" and "Components"); both break the build when accessed, showing a "Module not found" error.

image

I'm on Windows using Ubuntu-20.04 through WSL 2.

Installation failed: Conflicting peer dependency

I have fresh next.js setup with tailwindcss and it is producing conflict. I tried to install it with --force and --legacy-peer-deps but then it doesn't seem to install anything.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: [email protected]
npm ERR! node_modules/postcss
npm ERR!   dev postcss@"^8.2.8" from the root project
npm ERR!   peer postcss@"^8.1.0" from [email protected]
npm ERR!   node_modules/autoprefixer
npm ERR!     dev autoprefixer@"^10.2.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev jest-transform-css@"^2.1.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/postcss
npm ERR!   peer postcss@"^7.0.2" from [email protected]
npm ERR!   node_modules/jest-transform-css
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Add Avatar sizes

  • xs: 30x30
  • sm: 60x60
  • md: 90x90
  • lg: 120x120
  • xl: 150x150
  • 2xl: 180x180

Suggestion: mnemonic CSS classes

Description

IMHO, you can consider to use a mnemonic classes, such as:

<p class="d-text d-text-black">Hello Vampire</p>

Insteaf of:

<p class="drac-text drac-text-black">Hello Vampire</p>

Why I'm telling this, IMHO it's easier to remember, write and you'll remember the Dracula UI faster with the d-.

Standardize size attribute

Today we have different notations for the same attribute.

Heading

<Heading size="heading-1">

Spacing

<Box m="sm" />

Button / Anchor / etc

<Button size="xsmall">

My suggestion is to follow the same shorthand pattern (xs, sm, lg, etc).

Problem with site responsiveness

The documentation site does not behave as expected on screens with lower resolution.

captura-de-tela

This screenshot was taken on a notebook running Windows 10, at the native resolution of 1366x768, using the Google Chrome browser.

Select Disabled doesn't work

Hi there,

When I pass this prop, the component still clickable and I can select an option. Also the styles doesn't change.

Maybe passing this prop to select will work.

I tried to fork it and change here but it is not allowed yet.

Tailwind Version of Dracula UI

I would love if there is some sort of a Tailwind compatible version of Dracula UI โ€” so that it would be possible to do things like sm:drac-text-sm lg:drac-text-lg among other things.

Ideally, it should be like adding some custom config to tailwind.config.js, which would auto generate all the drac-* classes.

I would also try to come up with something similar to this, I think this is straightforward to achieve for every type of class other than those with gradients. Would have to do some hacking for gradients to work with Tailwind.

CSS Autocomplete

We would like to be able to autocomplete css classes based on the generated stylesheet.

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.