Skip to content

Make animated tabs in Tailwind CSS? #3622

Discussion options

You must be logged in to vote

Someone helped me on Tailwind Discord & posted this codepen. I converted it to React & made it work.

tailwind.config.js

module.exports = {
	theme: {
		extend: {
			translate: {
				200: '200%',
			},
		},
	},
}

App.tsx

import * as React from "react"
import { observer } from "mobx-react"
import clsx from "clsx"

import { useStore } from "./context"

const AppTheme = observer(() => {
	const {
		theme: { app },
		updateTheme,
	} = useStore()

	return (
		<>
			<div className="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
				<div className="mt-2">
					<h4 className="text-xl font-bold text-gray-800">Background</h4>
				</div>
			</div>

			<div className="relative mx-2 mt-2 rounded-md bg-g…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by deadcoder0904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant