docs/developer_docs/components/ui/label.mdx
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
The Label component from Superset's UI library.
<StoryWithControls component="Label" props={{ type: "default", children: "Label text", monospace: false }} controls={[ { name: "type", label: "Type", type: "select", options: [ "default", "info", "success", "warning", "error", "primary" ], description: "The visual style of the label." }, { name: "children", label: "Children", type: "text", description: "The label text content." }, { name: "monospace", label: "Monospace", type: "boolean", description: "Use monospace font." } ]} />
Edit the code below to experiment with the component:
function Demo() {
return (
<Label
type="default"
>
Label text
</Label>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "default" | The visual style of the label. |
children | string | "Label text" | The label text content. |
monospace | boolean | false | Use monospace font. |
import { Label } from '@superset/components';
:::tip[Improve this page] This documentation is auto-generated from the component's Storybook story. Help improve it by editing the story file. :::