Skip to content

Base components for toggleable elements (tabs, etc.)

Notifications You must be signed in to change notification settings

Tolkam-JS-Packages/react-toggleables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tolkam/react-toggleables

Base components for toggleable elements (tabs, etc.).

Usage

import { render } from 'react-dom';
import { Toggleables, Toggleable, Trigger } from '@tolkam/react-toggleables';

const element = <Toggleables defaultActive="two">
    <div>
        <ul>
            <Trigger of="one"><li><a href="">Show One</a></li></Trigger>
            <Trigger of="two"><li><a href="">Show Two</a></li></Trigger>
            <Trigger of="three"><li><a href="">Show Three</a></li></Trigger>
        </ul>
        <Toggleable name="one"><p>Tab One</p></Toggleable>
        <Toggleable name="two"><p>Tab Two</p></Toggleable>
        <Toggleable name="three"><p>Tab Three</p></Toggleable>
    </div>
</Toggleables>

render(element, document.getElementById('app'));

Documentation

The code is rather self-explanatory and API is intended to be as simple as possible. Please, read the sources/Docblock if you have any questions. See Usage for quick start.

License

Proprietary / Unlicensed 🤷

About

Base components for toggleable elements (tabs, etc.)

Resources

Stars

Watchers

Forks

Packages

No packages published