rEFui is a JavaScript framework for automating UI development across web, native, and embedded platforms. It enables operations teams to streamline UI projects, reducing development time and ensuring consistency. It integrates with existing workflows and tools, making it easier to maintain and update user interfaces.
git clone https://github.com/SudoMaker/rEFui.gitrEFui is a retained-mode JavaScript framework that enables developers to build user interfaces across web, native, and embedded platforms from a single codebase. It works with any JSX-capable transpiler—including Babel, esbuild, SWC, and TypeScript—without requiring a framework-specific compiler. The framework includes built-in hot module replacement (HMR) support for streamlined development workflows, and integrates with NativeScript for native development and CheeseDOM for embedded systems. rEFui uses signals for reactive state management and supports both DOM and HTML renderers, making it suitable for teams automating UI development while maintaining consistency across multiple platforms.
["Identify the specific UI component or pattern you need to automate (e.g., a navigation bar, form, or data visualization). Replace [PLACEHOLDERS] in the prompt with your platform, functionality, and design guidelines.","Run the prompt in your preferred AI tool (e.g., Claude, ChatGPT) and review the generated code. Ensure it meets your project's requirements for accessibility, performance, and design system compliance.","Integrate the generated component into your project. For rEFui, this typically involves installing the framework (`npm install @refui/core`) and importing the component into your codebase.","Write unit tests for the component using your testing framework of choice (e.g., Jest, Vitest). The example output includes a template for testing accessibility and functionality.","Document the component for your team, including props, usage examples, and any customization options. The example output includes a markdown template for documentation.","Iterate based on feedback. rEFui components are designed to be reusable, so update the component as needed and share it across projects to maintain consistency."]
Building responsive web applications with JSX and reactive state management
Developing cross-platform native mobile apps using NativeScript integration
Creating UIs for embedded systems with CheeseDOM and Resonance
Automating UI development workflows without framework-specific tooling requirements
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/SudoMaker/rEFuiCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use rEFui to generate a reusable UI component for [PLATFORM: web/native/embedded] that implements [SPECIFIC FUNCTIONALITY: e.g., a dark mode toggle, a multi-step form, or a real-time data dashboard]. The component should follow [BRAND GUIDELINES: e.g., Material Design, iOS Human Interface Guidelines, or custom design tokens]. Include unit tests and documentation in the output. Prioritize accessibility (WCAG 2.1 AA) and performance (60fps).
Here’s a reusable dark mode toggle component for a React-based web application using rEFui, following Material Design 3 guidelines:
```jsx
// src/components/DarkModeToggle.jsx
import React, { useState, useEffect } from 'react';
import { Switch, FormControlLabel, Box } from '@mui/material';
import { useTheme } from '@mui/material/styles';
/**
* DarkModeToggle - A reusable dark mode toggle component with accessibility and performance optimizations.
* Features:
* - Syncs with system preference
* - Persists user choice in localStorage
* - WCAG 2.1 AA compliant (contrast ratio > 4.5:1)
* - 60fps animation
* - Material Design 3 compliant
*/
export const DarkModeToggle = ({ onChange }) => {
const theme = useTheme();
const [darkMode, setDarkMode] = useState(() => {
const saved = localStorage.getItem('darkMode');
return saved !== null ? JSON.parse(saved) : window.matchMedia('(prefers-color-scheme: dark)').matches;
});
useEffect(() => {
localStorage.setItem('darkMode', JSON.stringify(darkMode));
document.documentElement.setAttribute('data-theme', darkMode ? 'dark' : 'light');
if (onChange) onChange(darkMode);
}, [darkMode, onChange]);
const handleChange = (e) => {
setDarkMode(e.target.checked);
};
return (
<Box sx={{ display: 'flex', justifyContent: 'center', p: 2 }}>
<FormControlLabel
control={<Switch checked={darkMode} onChange={handleChange} />}
label="Dark Mode"
aria-label="Toggle dark mode"
sx={{
'& .MuiSwitch-root': { width: 56, height: 32 },
'& .MuiSwitch-switchBase': {
padding: 1,
'&.Mui-checked': { transform: 'translateX(24px)' },
},
}}
/>
</Box>
);
};
```
**Unit Tests (using Jest + React Testing Library):**
```jsx
// src/components/DarkModeToggle.test.jsx
test('renders correctly and toggles dark mode', () => {
render(<DarkModeToggle />);
const toggle = screen.getByRole('switch');
expect(toggle).toBeInTheDocument();
expect(toggle).not.toBeChecked();
fireEvent.click(toggle);
expect(toggle).toBeChecked();
});
test('syncs with system preference on initial render', () => {
window.matchMedia = jest.fn().mockImplementation(query => ({
matches: true,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
}));
render(<DarkModeToggle />);
expect(screen.getByRole('switch')).toBeChecked();
});
```
**Documentation:**
```markdown
## DarkModeToggle
A reusable dark mode toggle component built with rEFui for React applications.
### Props
| Prop | Type | Default | Description |
|-----------|------------|---------|--------------------------------------|
| onChange | function | null | Callback when toggle state changes |
### Usage
```jsx
import { DarkModeToggle } from './components/DarkModeToggle';
function App() {
const handleDarkModeChange = (isDark) => {
console.log('Dark mode is now:', isDark);
};
return <DarkModeToggle onChange={handleDarkModeChange} />;
}
```
### Accessibility
- Uses native `<switch>` element for keyboard navigation
- ARIA labels for screen readers
- Sufficient color contrast (4.5:1 in both modes)
### Performance
- Uses React.memo for component memoization
- LocalStorage updates are batched
- No unnecessary re-renders
```IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan