All Projects → jeetiss → Tabs

jeetiss / Tabs

React tabs with hooks

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tabs

React Antd Multi Tabs Admin
ts+react+antd-多页签后台模板(纯净版,非 antd pro!)
Stars: ✭ 73 (-50.34%)
Mutual labels:  hooks, tabs
Use Less
React hooks that help you do what you already did, with more indirection
Stars: ✭ 135 (-8.16%)
Mutual labels:  hooks
Autohooks
Library for managing git hooks
Stars: ✭ 126 (-14.29%)
Mutual labels:  hooks
Mern Authentication
MERN stack authentication boilerplate: password reset, email verification, server sessions, redux, hooks and docker for dev and prod.
Stars: ✭ 129 (-12.24%)
Mutual labels:  hooks
Git Good Commit
Git hook to help you write good commit messages, with no external dependencies.
Stars: ✭ 128 (-12.93%)
Mutual labels:  hooks
React Use Scrollspy
Flexible React Hook to automatically update navigation based on scroll position
Stars: ✭ 133 (-9.52%)
Mutual labels:  hooks
Ajax Hook
🔱 Intercepting browser's AJAX requests which made by XMLHttpRequest.
Stars: ✭ 1,900 (+1192.52%)
Mutual labels:  hooks
Precommit
pre-commit hooks for R projects
Stars: ✭ 141 (-4.08%)
Mutual labels:  hooks
React Draggable Tab
Atom like draggable tab react component
Stars: ✭ 133 (-9.52%)
Mutual labels:  tabs
Window Size
React hook for subscribing to window size
Stars: ✭ 130 (-11.56%)
Mutual labels:  hooks
Hookish
Hooks in to interesting functions and helps reverse the web app faster.
Stars: ✭ 129 (-12.24%)
Mutual labels:  hooks
Wana
Easy observable state for React ⚡️
Stars: ✭ 128 (-12.93%)
Mutual labels:  hooks
React Atom
A simple way manage state in React, inspired by Clojure(Script) and reagent.cljs
Stars: ✭ 133 (-9.52%)
Mutual labels:  hooks
React Native Music App
React Native Music Application Example
Stars: ✭ 127 (-13.61%)
Mutual labels:  hooks
Fliptabs
Android Flip Tabs Library
Stars: ✭ 135 (-8.16%)
Mutual labels:  tabs
Btabs
A jQuery plugin open pages in tab, based on Bootstrap2,3
Stars: ✭ 124 (-15.65%)
Mutual labels:  tabs
Use Interval
A custom React Hook that provides a declarative setInterval called useInterval.
Stars: ✭ 127 (-13.61%)
Mutual labels:  hooks
Tipple
A lightweight dependency-free library for fetching data over REST with React.
Stars: ✭ 133 (-9.52%)
Mutual labels:  hooks
React Storage Hooks
React hooks for persistent state
Stars: ✭ 146 (-0.68%)
Mutual labels:  hooks
React Circular Input
React components for easily composing a circular range input
Stars: ✭ 141 (-4.08%)
Mutual labels:  hooks

@bumaga/tabs

Headless tabs component for React

Features

  • 📦 super small, 381 B vs 3.5kB react-tabs
  • 🚫 no styles, just logic. Style what you want, as you want
  • 🎣 components and hooks API

Install

npm install @bumaga/tabs
yarn add @bumaga/tabs

Usage

With components

import React from 'react'
import { Tabs, Tab, Panel } from '@bumaga/tabs' 

export default () => (
  <Tabs>
    <div>
      <Tab><button>Tab 1</button></Tab>
      <Tab><button>Tab 2</button></Tab>
      <Tab><button>Tab 3</button></Tab>
    </div>

    <Panel><p>Panel 1</p></Panel>
    <Panel><p>Panel 2</p></Panel>
    <Panel><p>panel 3</p></Panel>
  </Tabs>
);

With hooks

import React from "react";
import { Tabs, useTabState, usePanelState } from "@bumaga/tabs";

const Tab = ({ children }) => {
  const { onClick } = useTabState();

  return <button onClick={onClick}>{children}</button>;
};

const Panel = ({ children }) => {
  const isActive = usePanelState();

  return isActive ? <p>{children}</p> : null;
};

export default () => (
  <Tabs>
    <div>
      <Tab>Tab 1</Tab>
      <Tab>Tab 2</Tab>
    </div>

    <Panel>Panel 1</Panel>
    <Panel>Panel 2</Panel>
  </Tabs>
);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].