Files
react-test/docs/pages/joy-ui/api/badge.json
how2ice 005cf56baf
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
init project
2025-12-12 14:26:25 +09:00

211 lines
7.0 KiB
JSON

{
"props": {
"anchorOrigin": {
"type": {
"name": "shape",
"description": "{ horizontal: 'left'<br>&#124;&nbsp;'right', vertical: 'bottom'<br>&#124;&nbsp;'top' }"
},
"default": "{\n vertical: 'top',\n horizontal: 'right',\n}"
},
"badgeContent": { "type": { "name": "node" }, "default": "''" },
"badgeInset": {
"type": { "name": "union", "description": "number<br>&#124;&nbsp;string" },
"default": "0"
},
"children": { "type": { "name": "node" } },
"color": {
"type": {
"name": "union",
"description": "'danger'<br>&#124;&nbsp;'neutral'<br>&#124;&nbsp;'primary'<br>&#124;&nbsp;'success'<br>&#124;&nbsp;'warning'<br>&#124;&nbsp;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>&#124;&nbsp;'md'<br>&#124;&nbsp;'lg'<br>&#124;&nbsp;string"
},
"default": "'md'",
"additionalInfo": { "joy-size": true }
},
"slotProps": {
"type": {
"name": "shape",
"description": "{ badge?: func<br>&#124;&nbsp;object, root?: func<br>&#124;&nbsp;object }"
},
"default": "{}"
},
"slots": {
"type": { "name": "shape", "description": "{ badge?: elementType, root?: elementType }" },
"default": "{}",
"additionalInfo": { "slotsApi": true }
},
"sx": {
"type": {
"name": "union",
"description": "Array&lt;func<br>&#124;&nbsp;object<br>&#124;&nbsp;bool&gt;<br>&#124;&nbsp;func<br>&#124;&nbsp;object"
},
"additionalInfo": { "sx": true }
},
"variant": {
"type": {
"name": "union",
"description": "'outlined'<br>&#124;&nbsp;'plain'<br>&#124;&nbsp;'soft'<br>&#124;&nbsp;'solid'<br>&#124;&nbsp;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
}