Shenanigans
hooks
useful and common pieces of logical code that i think should be here.
filter by tags
useConfirm
ui/uxutilityconfirmation
Shows a confirmation dialog and returns a promise that resolves when the user accepts or rejects. Perfect for delete or irreversible actions.
const [DeleteDialog, confirm] = useConfirm(
"Are you sure?",
"This will delete all of the files from this project",
"destructive",
);useCopy
utilityclipboard
Copies text to the clipboard with optional toast and success/error states. Also includes a built-in, customizable CopyButton component.
const { CopyButton, copied, copy, error } = useCopy({
showToast: true,
successMessage: "Copied!",
});