@de-adlock/ui
v0.1.0
Published
Modern React component library for FiveM with built-in theme management
Maintainers
Readme
@de-adlock/ui
Modern React component library for FiveM with built-in theme management and gaming-specific components.
Installation
npm install @de-adlock/ui
# or
yarn add @de-adlock/ui
# or
pnpm add @de-adlock/uiQuick Start
import { Button, Input, Window, ThemeProvider } from '@de-adlock/ui'
import '@de-adlock/ui/styles'
function App() {
return (
<ThemeProvider>
<Window title="Game Menu" variant="glass" size="md">
<Input
type="text"
label="Character Name"
placeholder="Enter name..."
autoIcon={true}
/>
<Button variant="primary" glow>
Create Character
</Button>
</Window>
</ThemeProvider>
)
}FiveM Integration
For automatic theme synchronization with the dl-ui FiveM resource:
import { FiveMThemeProvider } from '@de-adlock/ui'
import '@de-adlock/ui/styles'
function App() {
return (
<FiveMThemeProvider>
{/* Your app - theme will auto-sync with player's selection */}
</FiveMThemeProvider>
)
}Complete Component List
Input Components
Input- All HTML5 input types with auto-icons (text, email, password, search, url, tel, number, date, time, etc.)Textarea- Auto-resizing multi-line text inputSelect- Single/Multi select dropdown with search functionalityFileInput- Drag & drop file upload with previewRange- Customizable slider with value displayColorPicker- Advanced color selection toolCheckbox- Styled checkbox inputRadio- Radio button groupsToggle- iOS-style toggle switch
UI Components
Button- 10+ variants (primary, secondary, success, error, warning, ghost, outline, glass, etc.)Card- Content container with hover effectsActionCard- Gaming menu cards with iconsWindow- Modal/Dialog with glass morphismModal- Centered modal overlayDialog- Confirmation dialogs
Feedback Components
Toast&ToastContainer- Notification systemAlert- Inline alert messagesBadge- Status/count badgesTooltip- Smart hover tooltipsWelcomeNotification- Animated welcome messages
Data Components
Table- Sortable data tablesPagination- Page navigationBar- Progress/Health/XP/Skill barsAvatar&AvatarGroup- User avatars
Layout Components
Tabs- Tab navigation with pills variantAccordion- Collapsible content sectionsSidebar- Navigation sidebar with icons
Gaming-Specific Templates
CharacterCreation- Complete character creator with attributesInventorySystem- Item management with categoriesThemeEditor- Live theme customizationBarDemo- Gaming bars showcaseControlsDemo- Form controls showcaseLayoutDemo- Layout components showcaseFeedbackDemo- Feedback components showcaseDataDemo- Data display showcase
Theming
The library comes with 5 stunning built-in themes:
🎮 Built-in Themes
- neon - Cyberpunk style with vibrant pink/cyan
- sakura - Japanese cherry blossom pink theme
- midnight - Deep blue/purple night theme
- aurora - Northern lights cyan/purple
- forest - Nature-inspired green theme
Custom Themes
import { createTheme, ThemeProvider } from '@deadlock/ui'
const myTheme = createTheme({
name: 'my-theme',
colors: {
primary: '#ff0000',
secondary: '#00ff00',
// ... other colors
}
})
function App() {
return (
<ThemeProvider defaultTheme={myTheme}>
{/* Your app */}
</ThemeProvider>
)
}TypeScript Support
Full TypeScript support with exported types for all components and themes.
import type { ButtonProps, Theme } from '@deadlock/ui'License
MIT © Deadlock
