New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jaak/primitives

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jaak/primitives

JAAK UI primitives

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
3
Weekly downloads
 
Created
Source

Primitives 🏗

UI primitives with predictable, unopinionated defaults and HTML-based semantics for scalable application architecture

Install

npm i @jaak/primitives

Usage

import { Text } from '@jaak/primitives'

const Component = () => (
  <Text>Hello primitives!</Text>
)

Composition

Primitives can be extended at application-level and composed into React components.

import { Button, Text, View } from '@jaak/primitives'

// Enhance primitives with custom attributes
const PrimaryButton = styled(Button)`
  box-shadow: ${({ boxShadow }) => boxShadow};
`

// Compose library and application-level primitives
const Component = () => (
  <View>
    <Text color='primary'>
      I 💖 Primitives!
    </Text>

    <AnchorButton>
      I want to be an ⚓️
    </AnchorButton>

    <PrimaryButton boxShadow='4px 2px 4px black'>
      🏗
    </PrimaryButton>
  </View>
)

Theming

Generate a theme that can be used with styled-components <ThemeProvider>:

import { theme } from '@jaak/primitives'
import { ThemeProvider } from 'styled-components'

// Theme values can be customised - this is optional
const customTheme = {
  palette: {
    primary: '#AAAAAA',
  }
}

const Component = () => (
  <ThemeProvider theme={theme(customTheme)}>
    ...
  </ThemeProvider>
)

Contributing

Preview

npm run styleguide:start

Build

npm run build

Test

npm test

Keywords

FAQs

Package last updated on 12 Nov 2018

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