UI components and themes for Alepha framework based on Mantine UI library.
npm install @alepha/ui
Mantine
Hooks provide a way to tap into various lifecycle events and extend functionality. They follow the convention of starting with use and return configured hook instances.
Use this hook to access the Dialog Service for showing various dialog types.
1const dialog = useDialog();2await dialog.alert({ title: "Alert", message: "This is an alert message" });3const confirmed = await dialog.confirm({ title: "Confirm", message: "Are you sure?" });4const input = await dialog.prompt({ title: "Input", message: "Enter your name:" });
Hook to get and set the current theme.
Returns a tuple with the current theme and a function to set the theme.
1const [theme, setTheme] = useTheme();
Use this hook to access the Toast Service for showing notifications.
1const toast = useToast();2toast.success({ message: "Operation completed successfully!" });3toast.error({ title: "Error", message: "Something went wrong" });