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

@cloudflare/elements

Package Overview
Dependencies
Maintainers
35
Versions
497
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/elements

Cloudflare Styled Elements

  • 3.0.8
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by3.61%
Maintainers
35
Weekly downloads
 
Created
Source

elements

Props-based styling hooked into the Cloudflare design system.

Installation

Installation with yarn is recommended

$ yarn add @cloudflare/elements

Usage

elements is a method of styling closely resembling writing semantic HTML, leading to greater readability. Because it uses styled-system under the hood, elements is able to work with most css-in-js libraries and greater enforce constraint-based styling.

Pseudo-classes

For pseudo-class usage, you'll want to default to usage of createComponent from @cloudflare/style-container.

Responsive styling

For guidelines on responsive styling, read the styled-system guidelines on styles.

When do I use Component Library?

Certain elements, such as <Button /> and <Select /> have counterparts in Component Library. To reduce confusion around when to use elements versus Component Library, a general rule of thumb is: if it looks like a Component Library component, it's best to use Component Library. If you need alternate styling but semantically require the specified DOM element (ex: <button />) then use elements. There will be ongoing work to rewrite Component Library using elements, thus this reduces the amount of maintenance needed.

FAQs

Package last updated on 23 May 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