0.17.2 • Published 2 months ago

@bolttech/atoms-tag v0.17.2

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

Tag Component

The Tag component is a simple and customizable React component designed to display labels or short text snippets with various styling options.

Table of Contents

Installation

To use the Tag component in your React application, follow these steps:

Installation

npm install @bolttech/frontend-foundations @bolttech/atoms-tag

or

yarn add @bolttech/frontend-foundations @bolttech/atoms-tag

Once you have the required dependencies installed, you can start using the Tag component in your React application.

Usage

The Tag component provides a flexible and customizable way to display labels or short text snippets with various styling options.

To use the component, import it and include it in your JSX:

import React from 'react';
import {Tag} from '@bolttech/atoms-tag';
import {bolttechTheme, BolttechThemeProvider} from "@bolttech/frontend-foundations"; // You can import your Tag component here

function App() {
  return (
    <BolttechThemeProvider theme={bolttechTheme}>
      <Tag label="New" variant="primary" fontWeight="caption" dataTestId="tag-new" />
    </BolttechThemeProvider>
  );
}

export default App;

Props

The Tag component accepts the following props:

PropTypeDescription
labelstringThe text content of the tag.
variantstringThe color variant of the tag (e.g., 'primary', 'secondary').
fontWeightstringThe typography variant for informational text (e.g., 'default', 'bold').
dataTestIdstringThe data-testid attribute for testing purposes.

Example

Here's an example of using the Tag component:

<Tag label="New" variant="primary" fontWeight="caption" dataTestId="tag-new" />

This will render a tag with the label "New" in the primary color variant and using the caption typography variant.

Contributing

Contributions to the Tag component are welcome. If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the project's Bitbucket repository.

0.17.2

2 months ago

0.17.1

4 months ago

0.11.0

9 months ago

0.12.0

9 months ago

0.13.0

9 months ago

0.14.0

8 months ago

0.15.0

7 months ago

0.16.0

6 months ago

0.17.0

6 months ago

0.16.1

6 months ago

0.10.0

10 months ago

0.0.1

10 months ago

0.9.0

10 months ago

0.8.0

10 months ago

0.5.3

10 months ago

0.7.0

10 months ago

0.6.0

10 months ago

0.5.2

11 months ago

0.5.1

11 months ago

0.3.0

1 year ago

0.5.0

11 months ago

0.4.1

12 months ago

0.3.2

12 months ago

0.4.0

12 months ago

0.3.1

12 months ago

0.2.0

1 year ago

0.1.0

1 year ago