Button with progress
A button that fills with a progress bar while it works.
Add it to your project
Or install the packages yourselfTerminal
npm install @mantine/core @mantine/hooks
First time with Mantine UI? Set it up once.
The code
import { useState } from 'react';
import { Button, Progress, rgba, useMantineTheme } from '@mantine/core';
import { useInterval } from '@mantine/hooks';
import classes from './ButtonProgress.module.css';
export function ButtonProgress() {
const theme = useMantineTheme();
const [progress, setProgress] = useState(0);
const [loaded, setLoaded] = useState(false);
const interval = useInterval(
() =>This comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.