Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
211 lines
7.0 KiB
JSON
211 lines
7.0 KiB
JSON
{
|
|
"props": {
|
|
"anchorOrigin": {
|
|
"type": {
|
|
"name": "shape",
|
|
"description": "{ horizontal: 'left'<br>| 'right', vertical: 'bottom'<br>| 'top' }"
|
|
},
|
|
"default": "{\n vertical: 'top',\n horizontal: 'right',\n}"
|
|
},
|
|
"badgeContent": { "type": { "name": "node" }, "default": "''" },
|
|
"badgeInset": {
|
|
"type": { "name": "union", "description": "number<br>| string" },
|
|
"default": "0"
|
|
},
|
|
"children": { "type": { "name": "node" } },
|
|
"color": {
|
|
"type": {
|
|
"name": "union",
|
|
"description": "'danger'<br>| 'neutral'<br>| 'primary'<br>| 'success'<br>| 'warning'<br>| string"
|
|
},
|
|
"default": "'primary'",
|
|
"additionalInfo": { "joy-color": true }
|
|
},
|
|
"component": { "type": { "name": "elementType" } },
|
|
"invisible": { "type": { "name": "bool" }, "default": "false" },
|
|
"max": { "type": { "name": "number" }, "default": "99" },
|
|
"showZero": { "type": { "name": "bool" }, "default": "false" },
|
|
"size": {
|
|
"type": {
|
|
"name": "union",
|
|
"description": "'sm'<br>| 'md'<br>| 'lg'<br>| string"
|
|
},
|
|
"default": "'md'",
|
|
"additionalInfo": { "joy-size": true }
|
|
},
|
|
"slotProps": {
|
|
"type": {
|
|
"name": "shape",
|
|
"description": "{ badge?: func<br>| object, root?: func<br>| object }"
|
|
},
|
|
"default": "{}"
|
|
},
|
|
"slots": {
|
|
"type": { "name": "shape", "description": "{ badge?: elementType, root?: elementType }" },
|
|
"default": "{}",
|
|
"additionalInfo": { "slotsApi": true }
|
|
},
|
|
"sx": {
|
|
"type": {
|
|
"name": "union",
|
|
"description": "Array<func<br>| object<br>| bool><br>| func<br>| object"
|
|
},
|
|
"additionalInfo": { "sx": true }
|
|
},
|
|
"variant": {
|
|
"type": {
|
|
"name": "union",
|
|
"description": "'outlined'<br>| 'plain'<br>| 'soft'<br>| 'solid'<br>| string"
|
|
},
|
|
"default": "'solid'",
|
|
"additionalInfo": { "joy-variant": true }
|
|
}
|
|
},
|
|
"name": "Badge",
|
|
"imports": ["import Badge from '@mui/joy/Badge';", "import { Badge } from '@mui/joy';"],
|
|
"slots": [
|
|
{
|
|
"name": "root",
|
|
"description": "The component that renders the root.",
|
|
"default": "'span'",
|
|
"class": "MuiBadge-root"
|
|
},
|
|
{
|
|
"name": "badge",
|
|
"description": "The component that renders the badge.",
|
|
"default": "'span'",
|
|
"class": "MuiBadge-badge"
|
|
}
|
|
],
|
|
"classes": [
|
|
{
|
|
"key": "anchorOriginBottomLeft",
|
|
"className": "MuiBadge-anchorOriginBottomLeft",
|
|
"description": "Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }}`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "anchorOriginBottomRight",
|
|
"className": "MuiBadge-anchorOriginBottomRight",
|
|
"description": "Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }}`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "anchorOriginTopLeft",
|
|
"className": "MuiBadge-anchorOriginTopLeft",
|
|
"description": "Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }}`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "anchorOriginTopRight",
|
|
"className": "MuiBadge-anchorOriginTopRight",
|
|
"description": "Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }}`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "colorContext",
|
|
"className": "MuiBadge-colorContext",
|
|
"description": "Class name applied to the root element when color inversion is triggered.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "colorDanger",
|
|
"className": "MuiBadge-colorDanger",
|
|
"description": "Class name applied to the badge `span` element if `color=\"danger\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "colorNeutral",
|
|
"className": "MuiBadge-colorNeutral",
|
|
"description": "Class name applied to the badge `span` element if `color=\"neutral\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "colorPrimary",
|
|
"className": "MuiBadge-colorPrimary",
|
|
"description": "Class name applied to the badge `span` element if `color=\"primary\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "colorSuccess",
|
|
"className": "MuiBadge-colorSuccess",
|
|
"description": "Class name applied to the badge `span` element if `color=\"success\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "colorWarning",
|
|
"className": "MuiBadge-colorWarning",
|
|
"description": "Class name applied to the badge `span` element if `color=\"warning\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "invisible",
|
|
"className": "MuiBadge-invisible",
|
|
"description": "State class applied to the badge `span` element if `invisible={true}`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "locationInside",
|
|
"className": "MuiBadge-locationInside",
|
|
"description": "State class applied to the badge `span` element if `location=\"inside\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "locationOutside",
|
|
"className": "MuiBadge-locationOutside",
|
|
"description": "State class applied to the badge `span` element if `location=\"outside\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "sizeLg",
|
|
"className": "MuiBadge-sizeLg",
|
|
"description": "Class name applied to the badge `span` element if `size=\"lg\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "sizeMd",
|
|
"className": "MuiBadge-sizeMd",
|
|
"description": "Class name applied to the badge `span` element if `size=\"md\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "sizeSm",
|
|
"className": "MuiBadge-sizeSm",
|
|
"description": "Class name applied to the badge `span` element if `size=\"sm\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "variantOutlined",
|
|
"className": "MuiBadge-variantOutlined",
|
|
"description": "Class name applied to the badge `span` element if `variant=\"outlined\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "variantPlain",
|
|
"className": "MuiBadge-variantPlain",
|
|
"description": "Class name applied to the root element if `variant=\"plain\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "variantSoft",
|
|
"className": "MuiBadge-variantSoft",
|
|
"description": "Class name applied to the badge `span` element if `variant=\"soft\"`.",
|
|
"isGlobal": false
|
|
},
|
|
{
|
|
"key": "variantSolid",
|
|
"className": "MuiBadge-variantSolid",
|
|
"description": "Class name applied to the badge `span` element if `variant=\"solid\"`.",
|
|
"isGlobal": false
|
|
}
|
|
],
|
|
"spread": true,
|
|
"themeDefaultProps": true,
|
|
"muiName": "JoyBadge",
|
|
"forwardsRefTo": "HTMLSpanElement",
|
|
"filename": "/packages/mui-joy/src/Badge/Badge.tsx",
|
|
"inheritance": null,
|
|
"demos": "<ul><li><a href=\"/joy-ui/react-badge/\">Badge</a></li></ul>",
|
|
"cssComponent": false
|
|
}
|