Socket
Socket
Sign inDemoInstall

solid-blocks

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-blocks

UI building blocks for SolidJS


Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

Solid-Blocks

UI building blocks for SolidJS

Core concepts

Valuable components instead of components without added value

Wrapping elements like headers, text, or images in custom Components is just wasteful. Components will only be provided if they have added value over their native elements. The added value may be

  • user experience
  • accessibility
  • developer experience
  • performance

If none of these advantages can be provided, it is preferable to use native HTML elements or SolidJS' abilities like Portal effectively.

Components with style instead of styled components

Directly using CSS is frowned upon nowadays, but not rightfully so. Well crafted CSS will easily outperform styled components. It should do so with

  • minimal bleeding (class prefix sb-[component], CSS reset, basic styles, theme variables)
  • semantic class names, i.e. .primary.sb-button
  • careful consideration of a11y
  • works as much as possible in non-JS environments (SSR)
  • theme-able, dark mode, inline mode switch possible
  • TODO: responsive layout

Usage

yarn
yarn dev

To use the components

import { Accordion, AccordionHeader } from "solid-blocks";

const MyApp = () => {
  return (
    <Accordion>
      <AccordionHeader>Accordion</AccordionHeader>
      <p>Hidden</p>
    </Accordion>
  );
};

FAQs

Package last updated on 08 Jan 2023

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