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

reflexjs

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reflexjs

A tiny library for creating and styling components using style props.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
decreased by-11.43%
Maintainers
1
Weekly downloads
 
Created
Source

reflexjs

A styling library for building flexible and accessible components with speed.

Quick Start

Step 1

Start by installing the reflexjs package into your React app.

npm i reflexjs

Step 2

Create a theme with your custom colors and typography.

export default {
  fonts: {
    body: "system-ui, sans-serif",
    heading: '"Avenir Next", sans-serif',
    monospace: "Menlo, monospace",
  },
  colors: {
    text: "#000",
    background: "#fff",
    primary: "#33e",
  },
}

Step 3

Wrap your app with the ThemeProvider from reflexjs.

import * as React from "react"
import theme from "./theme" // highlight-line
import { ThemeProvider } from "reflexjs" // highlight-line

export default function () {
  return (
    <ThemeProvider theme={theme}>
      <App />
    </ThemeProvider>
  )
}

Styling

You are now ready to style your components using style props.

/** @jsxImportSource "reflexjs" */

export default function CustomButton({ children }) {
  return (
    <button bg="primary" color="text" p="10px" rounded="5">
      {children}
    </button>
  )
}

Docs

Read the docs at https://reflexjs.org/docs.

FAQs

Package last updated on 14 Apr 2021

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