Hooks

Reusable React Hooks

SHIVMS UI provides reusable hooks that simplify state management, responsiveness, accessibility, and common UI behaviors while keeping your components clean and maintainable.

Example
import { useTheme } from "@shivms/ui";

export default function App() {
    const {
        theme,
        toggleTheme,
    } = useTheme();
}

Available Hooks

Example Usage

Import a hook from SHIVMS UI and use it in your components to simplify common UI behavior.

import {
    Button,
    useTheme,
} from "@shivms/ui";

export default function App() {
    const {
        theme,
        toggleTheme,
    } = useTheme();

    return (
        <Button
            onClick={toggleTheme}
        >
            Current Theme: {theme}
        </Button>
    );
}

Why Use Hooks?

01

Reusable Logic

Share common behavior across components without duplicating code.

02

Better Developer Experience

Write cleaner React components with less boilerplate.

03

Production Ready

Hooks are designed to be reusable, accessible, and easy to maintain.

Continue Reading

Explore more SHIVMS UI documentation and guides.