npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tailus/themer-dialog

v0.0.1

Published

Dialog themes

Downloads

11

Readme

Dialog theme

Overview

The dialog component theme is a collection of Tailwindcss utilities that can be used to create dialogs with a single variant. Dialogs are modal windows that appear in front of app content to provide critical information or ask for a decision.

Installation

To install the dialog component theme, run the following command:

npm install @tailus/themer-dialog

Importation

To import the dialog component theme, you can use the following import:

import { dialog } from "@tailus/themer-dialog";

Example

Radix UI

import * as Dialog from "@radix-ui/react-dialog";
import * as Toggle from "@radix-ui/react-toggle";
import { toggle } from "@tailus/themer-toggle";
import { button as buttonTheme, ghostButton } from "@tailus/themer-button";
import { dialog } from "@tailus/themer-dialog";
import { BookmarkIcon, BookmarkFilledIcon } from "@radix-ui/react-icons";

const DialogUI = () => (
    <Dialog.Root>
        <Dialog.Trigger>
            <Toggle.Root className={toggle.root.md} value="bookmark" aria-label="Bookmark">
                <BookmarkIcon className={toggle.iconBefore.primary.md} />
                <BookmarkFilledIcon className={toggle.iconAfter.primary.md} />
            </Toggle.Root>
        </Dialog.Trigger>
        <Dialog.Portal>
            <Dialog.Overlay className={dialog.overlay} />
            <Dialog.Content className={dialog.content}>
                <Dialog.Title className={dialog.title}>Sign in to bookmark</Dialog.Title>
                <Dialog.Description className={dialog.description}>
                    You need to be signed in to save your frequently used components.
                </Dialog.Description>

                <div className={dialog.actions}>
                    <Dialog.Close>
                        <button className={ghostButton.primary.md}>
                            <span>Cancel</span>
                        </button>
                    </Dialog.Close>
                    <Dialog.Close>
                        <button className={buttonTheme.primary.md}>
                            <span>Sign in</span>
                        </button>
                    </Dialog.Close>
                </div>
            </Dialog.Content>
        </Dialog.Portal>
    </Dialog.Root>
);

export default DialogUI;

Properties

The dialog object contains the following properties:

  • content: The Tailwindcss utility for the content of the dialog.
  • overlay: The Tailwindcss utility for the overlay that appears behind the dialog.
  • title: The Tailwindcss utility for the title of the dialog.
  • description: The Tailwindcss utility for the description of the dialog.
  • actions: The Tailwindcss utility for the actions in the dialog.
  • closeButton: The Tailwindcss utility for the close button in the dialog.

Customization

The following properties can be customized

Note: Customization except the border radius will be applied to all feedback components like the flag or the alert dialog (shares the same border radius).

Customizable properties:

  • border radius
  • light border color
  • dark border color
  • shadow size
  • shadow opacity
  • dark mode background
tailus: {
    components: {
        alert: {
            borderRadius : "",
        },
        overlay: {
            background : {
                color : "",
                opacity : ""
            }
            backdropBlur : "",
            dark : {
                background : {
                    color : "",
                    opacity : ""
                }
                backdropBlur : "",
            }
        },
        feedback: {
            borderColor : "",
            shadow : {
                size : "",
                opacity : ""
            },
            dark : {
                borderColor : "800",
                background : "950",
            }
        },
    },
},