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

@vonagam/svelte-vest-flowbite

v0.1.0

Published

Helpers for using Vest with Svelte

Downloads

2

Readme

@vonagam/svelte-vest-flowbite

Repository Package Version License

Provides UI components in style of Flowbite for @vonagam/svelte-vest.

Installation

npm install --save-dev @vonagam/svelte-vest-flowbite
yarn add --dev @vonagam/svelte-vest-flowbite
pnpm add --save-dev @vonagam/svelte-vest-flowbite

Usage

Usage example can be found in examples/svelte-vest-flowbite.

Api

All exported components have two variants - controlled and uncontrolled. Uncontrolled variant (like Checkbox) implements an UI component in Flowbite style. Controlled variant (like FieldCheckbox) is a wrapper around uncontrolled version with some props being set based on a field state.

All controlled variants have an additional required prop field of type string | FieldApi | FieldWrap to specify which field the component works with.

Components:

Checkbox

Checkbox represents a single checkbox input element (without a label).

// In addition to all input element props.
type Props = {
  // Values of checked checkboxes in a group. Default: an empty array.
  group?: (string | number)[],
  // Value corresponding to this checkbox. Default: "on".
  value?: string | number,
  // Checked status of checkbox. Default: undefined and then becomes boolean based on `group` and `value`.
  checked?: boolean | undefined,
  // Adds "sr-only peer" class if true. Default: false.
  custom?: boolean,
  // Color. Default: "base".
  color?: "base" | "green" | "red",
}

FieldCheckbox variant controls checked, color and disabled.

Input

Input represents a single input element.

// In addition to all input element props.
type Props = {
  // A type prop for an input element. Default: "text".
  type?: string,
  // Value. Default: undefined.
  value?: string | undefined,
  // Size. Default: "md".
  size?: "sm" | "md" | "lg",
  // Color. Default: "base".
  color?: "base" | "green" | "red",
}

FieldInput variant controls value, color and disabled.

Message

Message represents a message (error/warning/details) for an input.

// In addition to all element props.
type Props = {
  // Element tag to use. Default: "p".
  tag?: string,
  // Size. Default: "md".
  size?: "sm" | "md" | "lg",
  // Color. Default: "base".
  color?: "base" | "green" | "red",
  // Adds "opacity-50" if true. Default: false.
  disabled?: boolean,
}

FieldMessage variant controls color and disabled.

Name

Name represents a name for an input, usually inside a label.

// In addition to all element props.
type Props = {
  // Element tag to use. Default: "span".
  tag?: string,
  // Size. Default: "md".
  size?: "sm" | "md" | "lg",
  // Color. Default: "base".
  color?: "base" | "green" | "red",
  // Adds "opacity-50" if true. Default: false.
  disabled?: boolean,
}

FieldName variant controls color and disabled.

Radio

Radio represents a single radio input element (without a label).

// In addition to all input element props.
type Props = {
  // Value of a checked radio in a group. Default: "".
  group?: string | number,
  // Value corresponding to this radio. Default: "".
  value?: string | number,
  // Adds "sr-only peer" class if true. Default: false.
  custom?: boolean,
  // Color. Default: "base".
  color?: "base" | "green" | "red",
}

FieldRadio variant controls group, color and disabled.

Select

Select represents a select element.

// In addition to all select element props.
type Props = {
  // Options. If an empty array then default slot can be used for rendering custom options. Default: [].
  items?: {value: any, name: any}[],
  // Adds `<option disabled selected value="">{placeholder}</option>` if not undefined. Default: undefined.
  placeholder?: string | undefined,
  // Selected value. Default: undefined.
  value?: string | undefined,
  // Size. Default: "md".
  size?: "sm" | "md" | "lg",
  // Color. Default: "base".
  color?: "base" | "green" | "red",
}

FieldSelect variant controls value, color and disabled.

Textarea

Textarea represents a textarea element.

// In addition to all textarea element props.
type Props = {
  // Value. Default: undefined.
  value?: string | undefined,
  // Size. Default: "md".
  size?: "sm" | "md" | "lg",
  // Color. Default: "base".
  color?: "base" | "green" | "red",
}

FieldTextarea variant controls value, color and disabled.

Links