Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@juspay/svelte-ui-components

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@juspay/svelte-ui-components

This library provides a collection of reusable UI components built with [Svelte](https://svelte.dev/).

  • 1.11.0
  • npm
  • Socket score

Version published
Weekly downloads
74
decreased by-59.56%
Maintainers
0
Weekly downloads
 
Created
Source

Svelte UI Components

This library provides a collection of reusable UI components built with Svelte.

Installation

This library is publish on npm & can be installed via any npm client. Use the following command to install the library.

npm install @juspay/svelte-ui-components

Usage

The library contains a collection of components that can be imported & used in your svelte project.

Available components

  • Accordion
  • Badge
  • Banner
  • Brand Loader (aka Splash Screen )
  • Button
  • Carousel
  • Checkbox / Checklist Item
  • Icon
  • Input
  • Input with attached Button
  • List Item
  • Loader
  • Modal
  • Select
  • Status Screen
  • Table
  • Toggle
  • Toolbar

All of the components can be easily imported from the 'svelte-ui-components' package.

Example: Importing component from the package
<script lang="ts">
  import { Button, defaultButtonProperties } from '@juspay/svelte-ui-components';
</script>

<Button properties={{ ...defaultButtonProperties, text: 'Click' }} />

Customizing the components

Each component comes with a set of configuration options that can be used to customize the component. There are two ways to customize the component.

  1. Using css variables:

    • All the components have exposed css variables for all the properties available.
    • The css variables can be used to customize the component.
  2. Using props:

    • All the components have exposed props for dynamic values/variables.
    • The props can be used to customize the component.
Example: Customizing the component
<script lang="ts">
  import {
    Button,
    type ButtonProperties,
    defaultButtonProperties
  } from '@juspay/svelte-ui-components';

  const buttonProperties: ButtonProperties = {
    ...defaultButtonProperties,
    text: 'Submit'
  };

  function handleSubmitClick() {
    // handle click
  }
</script>

<div class="form">
  <Button properties={buttonProperties} on:click={handleSubmitClick} />
</div>

<style>
  .form {
    --button-color: black;
    --button-text-color: white;
    /* Other styling values */
  }
</style>

Contributing

  • Clone the repository
  • Install dependencies using pnpm install
  • Make changes to the components
  • Run tests using pnpm run test
  • Commit the changes
  • Push the changes
  • Create a pull request

Todo Items

  • Add demo support
  • Add documentation for all components
  • Add more components
  • Add tests

FAQs

Package last updated on 29 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc