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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dialca-ui

v1.3.0

Published

Components library of React and Tailwind. Simple. Customizable. Extensible

Downloads

57

Readme

DialcaUI Banner

Simple. Lightweight. Customizable 🚀

NPM Version GitHub last commit GitHub License GitHub Repo stars NPM Downloads


1. Install the package via your preferred package manager:

# with Yarn
$ yarn add dialca-ui

# with npm
$ npm i dialca-ui

# with pnpm
$ pnpm add dialca-ui

# with Bun
$ bun add dialca-ui

2. Import the styles in your main CSS/SCSS file:

Method 1: Import the styles directly in your main CSS/SCSS file

@import "dialca-ui/styles";
/* or */
@import "dialca-ui/css";

Method 2: Import the styles in your main TypeScript/JavaScript file

import "dialca-ui/styles";
// or
import "dialca-ui/css";

3. Start using the components in your React application:

import { InputField } from 'dialca-ui';
import { useState } from "react";

export const App = () => {
    const [name, setName] = useState("");
    const [password, setPassword] = useState("");
    const [showPassword, setShowPassword] = useState(false)
    return (
        // Classic input without more config.
        <InputField
            label="Name"
            value={name}
            onChange={(e) => setName(e.target.value)}
        />
        // More complex input
        <InputField
            label="Password"
            value={password}
            required
            minLength={8}
            hasErrors={!password}
            errorMessage="The password is required."
            isPassword
            showPassword={showPassword}
            toggleVisibility={() => setShowPassword(!showPassword)}
            onChange={(e) => setPassword(e.target.value)}
        />
    )
}
  • InputField: Text input component with validations and detect password; behavior available in Basic Usage
  • Textarea: Textarea with auto resize by default, with small integrations such as character counters; a basic example:
import { TxtArea } from "dialca-ui";
<TxtArea
	label="Default Textarea"
	value={txtArea}
	onChange={(e) => setTxtArea(e.target.value)}
	required
	hasCharCount
	charCountType="bottom"
	icon={<FaEnvelope />}
	hasErrors
	errorMessage="This field is required"
/>;
  • Select: Styled dropdown:
    • Disc: The options always must have the following format: { value: string, label: string }
<Select
	label="Select an option"
	value={selectedOption}
	options={[
		{
			value: "option1",
			label: "Option 1",
		},
		{
			value: "option2",
			label: "Option 2",
		},
	]}
	onChange={(e) => setSelectedOption(e.target.value)}
	// icon={<FaEnvelope />}
/>
  • RadioInput: Classic radio inputs but handling one or more options
    • Disc: The options always must have the following format: { value: string, label: string, description?: string, disabled?: boolean }
    • Disc2: The onChange prop isn't the same as the original behavior; awaits for a string as param, like: onChange: (value: string) => void
// With various options
<RadioInput
  name="plan"
  value={plan}
  onChange={setPlan}
  variant="card"
  options={[
    {
      value: "basic",
      label: "Basic Plan",
      description: "$9.99/month - Normal features",
    },
    {
      value: "pro",
      label: "Pro Plan",
      description: "$19.99/month - Improved features",
    },
  ]}
/>
// Radio with just one option
<RadioInput
  name="terms"
  value={acceptTerms}
  onChange={setAcceptTerms}
  hasErrors={!acceptTerms}
  errorMessage="You must accept our conditions and terms"
  options={[
    {
      value: "accepted",
      label: "Accept the conditions and terms",
    },
  ]}
/>
  • Loader: A classic loader with size variants, label and speed and direction options:
<Loader />;
{
	/* // Loader with sizing */
}
<Loader size="lg" />;
{
	/* the max value is 18 and min 5 */
}
<Loader size={5} direction="counterclockwise" speed="slow" />;
{
	/* // Loader with text */
}
<Loader text="Loading..." showText />;
  • CircleCharCounter: A char counter in a field with styling percentage based:
<CharCounter
	value={text}
	maxLength={100}
	size={40}
	// config prop allows you to customize the progress circle and the text color in its different states. and the text font size
	config={{
		strokeColor: {
			progress: "stroke-green-400",
			error: "stroke-red-500",
			warning: "stroke-yellow-400",
			background: "stroke-gray-200",
		},
		textColor: {
			progress: "text-green-500",
			error: "text-red-500",
			warning: "text-yellow-500",
		},
		fontSize: "text-sm",
	}}
	// classes prop allows you customize the container of the component or its text style.
	classes={{
		container: "shadow-md",
		text: "tracking-wide",
	}}
/>
  • DropZone: A drag and drop area component for different files to upload.
    • Disc: For the proper functioning of the component, make sure have an input for the click behavior (temp)
<DropZone
	isDragging={false}
	onDragOver={() => {}}
	onDragLeave={() => {}}
	onDrop={() => {}}
	onClick={() => {}}
	description="Upload your image"
	icon={<FaFileArrowUp />}
	hasErrors
	errorMessage="Solo se permiten imágenes"
	errorIcon={<FaCircleExclamation />}
/>
  • Modal: A simple and totally customizable modal component.
<Modal
	isOpen={isModalOpen}
	onClose={() => setIsModalOpen(false)}
	title="My Modal"
	variant="dark"
	position="bottom"
	animation="zoom"
	size="xl"
>
	<p className="mt-2">This is the content of the modal.</p>
</Modal>
  • Button: A styled button with variants and states.
<Button
	variant="success"
	size="md"
	onClick={() => alert("Button Clicked!")}
	loading={isLoading}
	loadingIcon={<Loader size="sm" />}
	loadingText="Loading..."
	disabled={isDisabled}
	icon={<FaCheck />}
	iconPosition="right"
	// If you don't want use children:
	// text="Click Me"
>
	Click Me
</Button>
  • Checkbox: A styled checkbox with variants and states.
<Checkbox
	label="Accept Terms and Conditions"
	description="You must accept before continuing"
	name="terms"
	checked={isChecked}
	onChange={setIsChecked}
	hasErrors={!isChecked}
	errorMessage="You must accept the terms and conditions."
	disabled={isDisabled}
	size="md"
	// indeterminate={isIndeterminate} // For indeterminate state
	variant="card"
/>
  • ToggleSwitch: A customizable toggle switch
<ToggleSwitch
	enabled={isEnabled}
	onChange={setIsEnabled}
	label="Enable Notifications"
	description="Turn on to receive notifications"
	enabledIcon={<FaBell />}
	disabledIcon={<FaBellSlash />}
	size="md"
	variant="default"
	hasErrors={!isEnabled}
	errorMessage="You must enable notifications."
	disabled={isDisabled}
/>
  • SearchableSelect: A select with search functionality and keyboard navigation.
<SearchableSelect
	label="Select a Country"
	options={[
		{ value: "us", label: "United States" },
		{ value: "ca", label: "Canada" },
		{ value: "mx", label: "Mexico" },
		// more options...
	]}
	value={selectedCountry}
	onChange={setSelectedCountry}
	placeholder="Choose a country"
	noResultsText="No countries found"
	isClearable
	rotateIcon={false}
	// dropdownIcon={<FaGlobe />} // Custom dropdown icon
	hasErrors={!selectedCountry}
	errorMessage="Please select a country."
	disabled={isDisabled}
	variant="outlined"
	size="md"
/>
<InputField
	label="Email"
	classes={{
		container: "my-custom-container",
		input: "border-red-500",
	}}
/>
  • To use the variants system make sure pass the 3 essential props: "variant", "extendDefault", "variants":
<RadioInput
	name="theme"
	// variant name, could be an existing variant, or new one, like this example
	variant="fancy"
	/* The extendDefault prop makes it extends the base styles, by default it's true; if it's false the component doesn't have styles
  it's useful if you want customize totally the component or not */
	extendDefault
	// The variants prop declare the new variant you create for the component
	// The sytax is like: { variant_name : { normal: { component parts }, other_state: {} } }
	// You must declare first the variant name, inner that must have the normal object with the component parts to customize, that's the normal style, you could add more states for that component.
	variants={{
		fancy: {
			normal: {
				container: "border-2 border-pink-500 rounded-lg p-3",
				text: "text-pink-600 font-semibold",
			},
		},
	}}
	options={[
		{ value: "light", label: "Light" },
		{ value: "dark", label: "Dark" },
	]}
/>

If you find any bugs, please report them on the GitHub Issues page.

git clone https://github.com/diego17cp/dialca-ui.git
cd dialca-ui
npm install
npm run dev

MIT © Dialcadev