
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@onbeam/business-features
Advanced tools
A collection of features built by combining components from `@onbeam/business-ui` and utils/hooks from `@onbeam/utils`, forming fully functioning ready to go features (for example handling cookie consent). It is necessary to setup `@onbeam/business-styled
A collection of features built by combining components from @onbeam/business-ui
and utils/hooks from @onbeam/utils
, forming fully functioning ready to go features (for example handling cookie consent). It is necessary to setup @onbeam/business-styled-system
when using this package, install all packages listed in the installation section and follow the PandaCSS setup steps.
Install the packages using your preferred package manager:
pnpm add @onbeam/business-features
pnpm add @onbeam/business-styled-system@latest
pnpm add @pandacss/dev@latest --save-dev
To keep all @onbeam
packages updated, you can use the CLI:
npx @onbeam/cli update -d [directory]
Due to the component styles building just-in-time, you need to install and configure PandaCSS. This means that only the styles for the components you use will be generated, nothing more. When you decide to utilize PandaCSS in your own project, you will be able to use all design tokens and PandaCSS will combine the UI styles with your project styles before compiling the output.
Create a panda.config.ts
file in the root of your application and paste this snippet in there:
import { defineBeamUiConfig } from "@onbeam/business-styled-system/config";
export default defineBeamUiConfig({
include: [
"./node_modules/@onbeam/business-ui/dist/panda.buildinfo.json", // Only add this when you're using the @onbeam/business-ui package
// TODO: Configure this line to target your own files that utilize the component library and PandaCSS
"./src/**/*.{ts,tsx}",
],
});
Run npx panda init --postcss
. This will create a postcss.config.cjs
file in the root of your application with the following code:
module.exports = {
plugins: {
"@pandacss/dev/postcss": {},
},
};
To enable the styles, create a global CSS file, for example named "globals.css
" and paste the following snippet in there:
/* When adding libraries that could overwrite our styles, make sure to use css layers: */
/* https://panda-css.com/docs/overview/faq#how-can-i-prevent-other-libraries-from-overriding-my-styles */
@layer reset, base, tokens, recipes, utilities;
body {
font-family: var(--beam-business-fonts-main);
color: var(--beam-business-colors-mono-primaryBg);
}
/* TODO: These are all fonts used in the @onbeam/business-ui components. Add all your used fonts here */
@font-face {
font-family: "Beam Sans";
font-style: normal;
font-display: swap;
font-weight: 300;
src: url("../node_modules/@onbeam/business-ui/dist/fonts/BeamSans-Book.ttf");
}
@font-face {
font-family: "Beam Sans";
font-style: normal;
font-display: swap;
font-weight: 700;
src: url("../node_modules/@onbeam/business-ui/dist/fonts/BeamSans-Bold.ttf");
}
In the root of your project code, for example layout.tsx
or _app.tsx
, import your created css file:
import "./globals.css";
To build the PandaCSS code, add the panda codegen
command to your package.json
's build script. For example:
"scripts": {
"build": "panda codegen && next build",
},
This package is fully tree-shakable, ensuring that only the features you import are included in your final bundle, optimizing your app's performance.
import { CookieConsent } from "@onbeam/business-features";
const AppLayout = ({ children }) => {
return (
<>
{children}
<CookieConsent
consentDomain={
process.env.NODE_ENV === "development" ? "localhost" : ".onbeam.com"
}
/>
</>
);
};
That's it! Happy coding! 🌈
FAQs
A collection of features built by combining components from `@onbeam/business-ui` and utils/hooks from `@onbeam/utils`, forming fully functioning ready to go features (for example handling cookie consent). It is necessary to setup `@onbeam/business-styled
The npm package @onbeam/business-features receives a total of 156 weekly downloads. As such, @onbeam/business-features popularity was classified as not popular.
We found that @onbeam/business-features demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.