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

pandacss-preset-space

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pandacss-preset-space

More 🐼 PandaCSS space utilities

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Downloads Contributors Forks Stargazers Issues MIT License LinkedIn

More 🐼 PandaCSS space utilities

Add the missing spaceX and spaceY utilities to 🐼 PandaCSS.

Installation

npm install --save-dev pandacss-preset-space

Usage

Add the preset to your PandaCSS configuration (panda.config.ts)

import { defineConfig } from "@pandacss/dev";

// Import the preset. The name can be anything you want
import spacePreset from "pandacss-preset-space";

export default defineConfig({
  presets: [
    spacePreset,
    // Re-add the panda preset if you want to keep
    // the default keyframes, breakpoints, tokens
    // and textStyles provided by PandaCSS
    "@pandacss/preset-panda",
  ],
});

You can now use the spaceX and spaceY utilities within your styles. The values are based on the spacing tokens you can set in your 🐼 PandaCSS configuration.

spaceX adds a margin to the left of every child element except the first one. spaceY adds a margin to the top of every child element except the first one.

export function Page() {
  return (
    <div
      className={css({
        spaceY: 4,
      })}
    >
      <div>Hello</div>
      <div>World</div>
    </div>
  );
}

Attributions

Keywords

FAQs

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