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

skateui

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skateui

Vanilla HTML compatible custom UI components

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
79
increased by690%
Maintainers
1
Weekly downloads
 
Created
Source

Skate UI

Objective:

  • Provide components that are commonly desired in web development, yet not so easy to implement.
  • UI component 100% compatible with vanilla HTML.
  • Style should be easily customizable via css without implementing additional custom attributes.

Known issues:

  • skateui use getComputedStyle and mutationobserver internally. when developing, depending on the os/browser, there can be some minor quirks when:
    • trying to modify css styles directly from developers panel in web browsers.
    • working on live reloads.
    but when refreshed, the quirks will go away.

Components:

  • sui-nav: Navbar that hides when scrolling down, and shows when scrolling up.

    Attributes:

    • auto-hide: "true" | "false" | Number(Higher number means it will hide slower)
  • sui-flextext: Text that auto scales.

    Attributes:

    • min-size: number
    • max-size: number
  • sui-tooltip: Tooltip that shows when hovering over an element.

  • sui-overlay: Fully customizable overlay that shows when clicked.

    Attributes:

    • position: "top" | "bottom" | "left" | "right" | "center"(default)

    Properties:

    • open(): Opens the overlay.
    • close(): Closes the overlay.
  • sui-textarea: Textarea that auto resizes.

Example

<!DOCTYPE html>

<head>
    <script type='module' src="https://cdn.jsdelivr.net/npm/skateui@latest/dist/skateui/skateui.esm.js"></script>
</head>

<body style="margin:0;">
    <!-- You can now use skateui components -->
    <sui-nav style='padding: .5em;background-color:blue;color:white'>
        <h2>Skate Navbar</h2>
    </sui-nav>

    <br><br>

    <sui-flextext>Hello my name is Baksa</sui-flextext>
    
    <br><br>

    <sui-tooltip>
      <div slot="tool"
        style="font-size: 1.2em; font-weight: bold; background-color: red;color:white;padding: .25em;cursor: pointer;">
        Hover me to say HI</div>
      <div slot="tip" style="background-color: black;color:white;padding:.5em;">
        Hello
      </div>
    </sui-tooltip>
    
    <br><br>

    <button onclick='overlay.open()'>Click me</button>
    <sui-overlay id="overlay" onclick="this.close()">
        <div style="background-color:antiquewhite;border: solid 4px black;padding:1em;">
            <h1>Hello Skate UI</h1>
        </div>
    </sui-overlay>
    
    <br><br>
    
    <sui-textarea placeholder="Skate Textarea"></sui-textarea>
</body>

FAQs

Package last updated on 24 Jul 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