@malilion/block-ui-react
v0.6.1
Published
Block UI — block / pixel / crafting game-style React components: inventory, crafting, HUD, cards, forms and more.
Maintainers
Readme
@malilion/block-ui-react
Block / pixel / crafting game-style React components: inventory, crafting, HUD, cards, forms, and more.
Install
pnpm add @malilion/block-ui-reactThis installs @malilion/block-ui-tokens, @malilion/block-ui-themes and @malilion/block-ui-icons. Peer dependencies: react and react-dom ^18.2 or ^19.
Usage
import { BlockUIProvider, BlockButton } from "@malilion/block-ui-react";
import "@malilion/block-ui-react/styles.css";
function App() {
return (
<BlockUIProvider theme="grassland">
<BlockButton variant="grass">Mine!</BlockButton>
</BlockUIProvider>
);
}Import components from the package root:
import { InventoryGrid, InventorySlot, ItemStack, QuestCard } from "@malilion/block-ui-react";Themes
BlockUIProvider accepts grassland, cave, deepslate, nether, and end.
Styles
Load the bundled stylesheet once:
import "@malilion/block-ui-react/styles.css";That file includes design tokens and theme CSS.
