Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@onbeam/ui
Advanced tools
For an example project, check out the [starter template repository](https://github.com/BuildOnBeam/beam-next-app-router-starter). This project already has everything set up in a minimal way. If it suits your use-case, use that repository as a template for
For an example project, check out the starter template repository. This project already has everything set up in a minimal way. If it suits your use-case, use that repository as a template for your new project. This will save you some time implementing the required packages.
If you're using TailwindCSS alongside Beam UI (PandaCSS) within your application, check out this example repository for the documentation on how to combine these two packages.
In order to use the UI library, you have to install a few packages:
pnpm add @onbeam/ui@latest @onbeam/styled-system@latest
pnpm add @pandacss/dev@latest --save-dev
*It's also possible to only use the styled-system without the UI library.
Icons are optional. If you need them, you can install them with the following command:
pnpm add @onbeam/icons@latest
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/styled-system/config";
export default defineBeamUiConfig({
include: [
'./node_modules/@onbeam/ui/dist/panda.buildinfo.json',
// 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-fonts-main);
color: var(--beam-colors-mono-100);
}
/* TODO: These are all fonts used in the @onbeam/ui components. Add all your used fonts here */
@font-face {
font-family: "Suisse Intl";
font-style: normal;
font-display: swap;
font-weight: 400;
src: url("../node_modules/@onbeam/ui/dist/fonts/SuisseIntl-Regular.otf");
}
@font-face {
font-family: "Suisse Intl";
font-style: normal;
font-display: swap;
font-weight: 500;
src: url("../node_modules/@onbeam/ui/dist/fonts/SuisseIntl-Book.otf");
}
/* TODO: Remove this if you're not using the `ObjectTree` component */
@font-face {
font-family: "JetBrains Mono";
font-style: normal;
font-display: swap;
font-weight: 400;
src: url("../node_modules/@onbeam/ui/fonts/JetBrainsMono-Regular.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",
},
That's it! Happy coding! 🌈
FAQs
A collection of all UI components styled using the Beam design system. For an overview of all UI components click [here](https://packages.onbeam.com/).
The npm package @onbeam/ui receives a total of 348 weekly downloads. As such, @onbeam/ui popularity was classified as not popular.
We found that @onbeam/ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.