A modern, customizable React chip component for creating interactive social media links and tags with icons. Built with TypeScript and CSS for maximum flexibility and type safety.
- Fully customizable colors with auto-opacity
- Custom link support
- Clean CSS without framework dependencies
- TypeScript support
- Lightweight and performant
npm install bixat-chip
# or
yarn add bixat-chip
import { BixatChip, TagType, BixatTags } from 'bixat-chip';
import { FaGithub } from 'react-icons/fa';
const githubTag: TagType = {
name: "GitHub",
textColor: "#333333",
icon: <FaGithub />,
website: "https://github.com/bixat"
};
// Example usage of predefined tags
const predefinedTag = BixatTags.github;
function App() {
return (
<div>
<BixatChip
tag={githubTag}
withTitle={true}
/>
<BixatChip
tag={predefinedTag}
withTitle={true}
/>
</div>
);
}
Prop | Type | Required | Description |
---|---|---|---|
tag |
TagType |
Yes | Tag configuration object |
link? |
string |
No | Custom link (overrides tag.website) |
withTitle |
boolean |
Yes | Toggle title visibility |
interface TagType {
name: string; // Tag display name
textColor: string; // HEX color code
icon: ReactNode; // React icon component
website: string | undefined; // Default URL
}
import { BixatChip, TagType } from 'bixat-chip';
import { FaGithub, FaTwitter, FaLinkedin } from 'react-icons/fa';
const socialLinks = () => {
const tags: TagType[] = [
{
name: "GitHub",
textColor: "#333333",
icon: <FaGithub />,
website: "https://github.com/bixat"
},
{
name: "Twitter",
textColor: "#1DA1F2",
icon: <FaTwitter />,
website: "https://twitter.com/bixat4dev"
}
];
return (
<div style={{ display: 'flex', gap: '1rem' }}>
{tags.map(tag => (
<BixatChip
key={tag.name}
tag={tag}
withTitle={true}
/>
))}
</div>
);
};
.bixat-chip-link {
/* Link styles */
}
.bixat-chip-container {
/* Container styles */
}
.bixat-chip-icon {
/* Icon styles */
}
.bixat-chip-title {
/* Title styles */
}
git clone https://github.com/bixat/bixat-chip.git
npm install
npm run build
- Fork the repository
- Create your feature branch (
git checkout -b feature/add-tag
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/add-tag
) - Open a Pull Request
MIT © Bixat.dev