An element to visually represent a drop's tags.
import React from 'react';
import { Tag } from '@minddrop/ui';
export const TagDemo = () => (
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ display: 'flex', columnGap: 8 }}>
<Tag color="red" label="Important" />
<Tag color="blue" label="Equation" />
<Tag color="gray" label="Diagram" />
</div>
</div>
);
export default TagDemo;
Import the component from the @minddrop/ui
package.
import { Tag } from '@minddrop/ui';
export default () => {
return <Tag label="Formula" color="blue" />;
};
TagProps
extends React.HTMLAttributes<HTMLSpanElement>
.
Prop | Type | Default |
---|---|---|
label* | string | |
color | ContentColor | blue |